Re: Generating thumbnails of images and videos
- Posted by mic_ Jul 26, 2009
- 1128 views
I've got a new version of the CxImage wrapper that lets you save to memory, something like this:
constant ptr = allocate(4) atom pEncodedData integer bufferSize bufferSize = CXI_SaveImage(image, ptr, CXI_FORMAT_JPG) if bufferSize > 0 then pEncodedData = peek4u(ptr) else -- Error end if
It also adds functions to generate a HBITMAP directly from a loaded image, to create thumbnails with correct aspect ratio, and to apply various filters like rotation, blur, gamma, dither..
It hasn't been properly tested or documented yet so I'll upload it to the archive later, but in the meantime you can find it here