ResizeImage() - No gamma error

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

ResizeImage() - No gamma error

Post by c4s »

Would it be possible to tune the ResizeImage() function so that the gamma error is reduced/fixed? Maybe you could add a new flag if the calculations are too intensive.
Here is a website with extensive information about it:
http://www.4p8.com/eric.brasseur/gamma.html

The test suggested on that site tells me that ResizeImage() works incorrectly.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: ResizeImage() - No gamma error

Post by luis »

Fascinating. Great reading. This explain some things I always thought were "normal" defects.

Thanks!
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: ResizeImage() - No gamma error

Post by kenmo »

Interesting article, but I don't agree with his labeling of resizing algorithms as "correct" or "incorrect".

The common resize algorithms (raw, bilinear, bicubic, Lanczos, etc.) are standard, and they all have advantages and disadvantages. The minor changes in gamma is negligible in 99% of cases... unless you are writing advanced photograph software, or you are dealing with strange specific cases like his "tuned" Dalai Lama picture or the RULES/SUCKS image at the end.

But in those cases, you might as well be writing and fine-tuning your own resize procedures, rather than using PB's general purpose one.


HOWEVER, I would love to see more resize options added to PureBasic. I think the only current interpolation is bilinear?
Bicubic, sinc, whatever-this-gamma-correcting-one-is-called would all be nice, just not a high priority.
Last edited by kenmo on Fri May 23, 2014 9:40 pm, edited 1 time in total.
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: ResizeImage() - No gamma error

Post by NicTheQuick »

+1
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Post Reply