Page 2 of 2

Re: PNG and JPEG images

Posted: Mon Sep 28, 2020 7:07 am
by csterg
OK, I understand.
Would it be a solution to use the better scaling code for all PNG images? I read a bit about the windows algorithm and its really very simplistic, no interpolation nothing. I mean such code should never be used in modern apps, it only makes images look bad no matter what.

Re: PNG and JPEG images

Posted: Mon Sep 28, 2020 7:41 am
by Sergey Tkachenko
Yes, I plan to support quality scaling of semitransparent images in one of future updates.
Currently, for unsupported images, TRichView simply calls Graphic.StretchDraw, so results depend on a graphic class implimentation.

Re: PNG and JPEG images

Posted: Mon Sep 28, 2020 12:27 pm
by csterg
Seems like most graphics implementation do a really bad job here. Its good to know, thanks

Re: PNG and JPEG images

Posted: Mon Sep 28, 2020 3:11 pm
by csterg
Is there a quick hacky way to use the old custom resizing code as you did in rv14? Until the new code comes in place. At this moment the thing seems broken when compared to previous behavior.

Re: PNG and JPEG images

Posted: Mon Sep 28, 2020 6:44 pm
by Sergey Tkachenko
If you want to allow resizing of transparent images, open RVThumbMaker.pas, and remove the code that checks transparency in TRVThumbnailMaker.IsAllowedFor.
But scaled images will lose transparency.

Re: PNG and JPEG images

Posted: Tue Sep 29, 2020 9:22 am
by csterg
OK, i will try that out, thanks for the tip