Page 1 of 1
preferences for ImageEncoders
Posted: Mon Jun 04, 2007 6:49 pm
by Kaeru Gaman
it would be nice to be able to set more Values when using ImageEncoders for SaveImage/SaveSprite.
e.g. for JPG:
Quality 0-100
[] progressive JPG
[] grayscale JPG
[] Disable color subsampling
maybe SetJPGEncoderPreferences(.....
Posted: Mon Jun 04, 2007 6:54 pm
by AND51
Why including a new command?
I would prefer using the Flag-Parameter at SaveImage/Sprite and using constants.
Posted: Mon Jun 04, 2007 6:57 pm
by Kaeru Gaman
because different Encoders have different numbers of parameters...
there are more than the above for JPG,
for PNG it's only compression 0-9 and an additional transparent color if without alpha.
Posted: Mon Jun 04, 2007 7:44 pm
by AND51
I have no problem with implementing a new command (if Fred agrees with your idea).
But basically I prefer using existing commands. Maybe Fred can extend the Save-Commands like this:
Code: Select all
SaveImage(#Image, FileName$[, Flags[, Mode])
Imagine, you want to save more than 1 image at once but with different settings. Then you've got much t write:
Code: Select all
SetJPEGSettings(#PB_JPEG_Gray)
SaveImage(...)
SetJPEGSettings(#PB_JPEG_Quality, 95)
SaveImage(...)
; and so on
In my opionion, this would be a disadvantage.
I suggest to await Fred's agreement, otherwise we don't need to think about the 'how'.
Posted: Mon Jun 04, 2007 8:23 pm
by Kaeru Gaman
also I can construct a scenario, where you want to save a hundred pictures with the same settings... so what? :roll:
Posted: Mon Jun 04, 2007 8:34 pm
by AND51
So what? When saving images with the SAME settings you...
Just create a macro...
Or use a loop instead...

Posted: Mon Jun 04, 2007 9:36 pm
by Kaeru Gaman
are you often selling the leather before the calf is born?

Posted: Mon Jun 04, 2007 9:40 pm
by AND51
Kaeru Gaman wrote:are you often selling the leather before the calf is born?

No idea what to say now?
I wrote:I suggest to await Fred's agreement, otherwise we don't need to think about the 'how'.
