SaveBuffer as PNG or JPEG?
Blitz3D Forums/Blitz3D Programming/SaveBuffer as PNG or JPEG?
| ||
Does anyone know of any libs or code that lets me export buffers as anything other than BMP? Thanks. |
| ||
FreeImage? http://www.blitzbasic.com/codearcs/codearcs.php?code=1732 |
| ||
Is it possible using Freeimage to specify the compression ratio of saved .jpg? The default quality seems very low. |
| ||
You can specify the compression ratio in freeimage. I believe it's an optional parameter in the function. |
| ||
Hi From the freeimage decls there is no extra parameter for specifying the compression ratio of jpg's. Im using the command - FiSaveImage(img, filename$) |
| ||
This is the FreeImage lib I use (FI_B3D_min.bb): And here's the decls (FreeImage.decls): As you can see, the SaveJPG function allows you to speicify the compression in the 3rd parameter. |
| ||
Yes i can see your version have the extra parameter, but mine doesn't :/ I couldnt run your files because of missing function "RtlMoveMemory_From" |
| ||
Oh, sorry. You'll also need this decls, too: kernel32.decls .lib "kernel32.dll" RtlMoveMemory_To%(Destination%,Source*,Length%) : "RtlMoveMemory" RtlMoveMemory_From%(Destination*,Source%,Length%) : "RtlMoveMemory" RtlMoveMemory_Ex%(Destination%,Source%,Length%) : "RtlMoveMemory" |