I think PureBasic should simply switch to a better encoding algorithm similar as e.g. Photoshop does.
Edit: luis said it a little better.

Oooh, good comeback.luis wrote:For example a photographic image of a beautiful sunset with a road sign in the image.
Some time ago there was a strange guy called Maya.MachineCode wrote:Oooh, good comeback.I have no argument now.
nase09 wrote:Some time ago there was a strange guy called Maya.MachineCode wrote:Oooh, good comeback.I have no argument now.
He developed a handy little calendar-tool, able to calculate Doomsday (and it shows all years statutory holidays, too!).
Of course he used Purebasic.
Unfortunately he saved the calendar's output as jpg to mail it to my aunt's daughter. The poor little girly was pretty upset: "Doomsday is 21.12.2012!!".
I said to her "wait a minute, this jpg looks strange - pretty crabbed.. are you sure this is a '1' .. this jpg contains text - it should have been saved as PNG!".
But too late. The last few weeks were terrible. My aunt's daughter almost got mad - told all of her friends to prepare for the end, and my mother (and even my neighbor's cat!) almost got mental breakdown, and my grandpa didn't stop yelling "WE'RE ALL GONNA DIEEE!!"..
(But seriously: most people here know the benefits of the different image formats. But e.g. sometimes you're limited to one single file format (jpg), and e.g. sometimes saving as PNG is no option (cause png support is pretty rare). The jpeg format CAN deliver excellent quality - so why not using it)
Dear Fred, thank you for the improvements in v5.10.Fred wrote:We use standard libjpeg so I don't know why the results are bad.
ok, this would be a workaround.. but very unconvenient..Thorium wrote:You may be better of using libjpeg directly yourself. Image saving in PB isnt very great. It's ok, but if you need something fancy you need to go deeper. Same goes for PNG. Naturally you dont have a quallity lose in PNG, but PNG's saved with PB are much bigger than saved with other software because PB does not utilize the PNG filters.
Code: Select all
; Example to adapt old source code...
CompilerIf #PB_Compiler_Version<520
#JPEGQualityFactor=1
CompilerElse
#JPEGQualityFactor=10
CompilerEndif
SaveImage(...,quality*#JPEGQualityFactor)