Replies: 1 comment 4 replies
-
I’m on my mobile so can’t read your code sample but it sounds like you’re doing the operation 2X? Using the target size with the general decoder options will always yield the exact size you want. We do a first pass internally using the decoder, then follow up to resize the difference. What platform are you running on? We should be much closer than those numbers. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, so I've upgraded to v3.0 and changed my load to use the new TargetSize config. Processing 1,800 images all of about 9MB, 4600x3600 res approx), specifying a targetsize of 800x800 as the bounded box to decode. Each image is loaded at 800x800, then resized to 3 increasingly smaller resolution thumbnails and then all 4 are saved.
I'm seeing almost zero performance gain when loading.
You can see that v3 is slightly faster, but only because of the resize, not because of the load time.
The code change is here: Webreaper/Damselfly@e78b517#diff-bc7171db6cb3f840952a6f899a5776dc3449e630301b9b488c8025c39dd06411R67
What am I missing? I was expecting to see the load time drop significantly - because the decoder would do a progressive decode for the image. Am I right in understanding that targetsize is basically saying "decode the closest size to fall within these bounds"? Or is it different to that?
Do I need to do something smarter to make the use of the TargetSize more optimal - similar to the
GetScaledDimensions
call that I use when I do a scaled load with SkiaSharp (as here)?Beta Was this translation helpful? Give feedback.
All reactions