VB6_to_PBx wrote:the JPEG Quality setting does not seem to change the actual Quality of the Saved Image or the file size
I find it difficult sometimes how to convert a C structure to PureBasic, when to use #PB_Structure_AlignC or not.
I made some changes to the structure definitions on Windows. Please test it and let me know if it works now.
netmaestro wrote:May I ask what is the purpose of this approach to SaveImage for the jpeg encoder: [..], #SystemImagePlugin_JPEG | <quality> when the PureBasic SaveImage command has a parameter following imageplugin for flags, which is where PB currently handles its own jpeg quality?
For every encoder plugin you register, you need two functions Encode24 and Encode32 (if you want to support 32 bit as well).
Encoding is almost the same for every image type so instead of registering an individual plugin for every image type, I chose to use one named #SystemImagePlugin .
You put this where you normally specify the plugin like #PB_ImagePlugin_PNG . This leaves only one argument left for the procedure that can be used (Flags) and for JPEG you need to specify both the format and the quality so I had to combine those into one value.