Image.Thumbnail causes distortion on underlying file
See original GitHub issueI’ve been using NetVips successfully for many images, but a few have suddenly caused some weird distortions and I cannot understand why.
This is the original file
This is the thumbnail produced:
Here is the code
var expectedBytes = Image.Thumbnail("expected.jpg"), 320).WriteToBuffer(".png");
var thumbnail = Image.Thumbnail("input.jpg", 320);
thumbnail.WriteToFile("ouput/expected.png");
var actualBytes = File.ReadBytes("output/expected.png")
Assert.Equal(expectedBytes, actualBytes)
I tried both jpg and png (not sure if NetVips does anything different), but it always spits out this weird corrupted version. Yet windows viewer can open it fine.
Any ideas?
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Distorted Thumbnail for .docx file - photools.com
The thumbnail images do indeed show in IMatch, but the newer format (.docx) file is curiously distorted, as shown in the attached screenshot ......
Read more >Distorted Thumbnails after exporting from Photoshop
I have been heavily editing images in photoshop (mainly sharpening them up) and I am having a problem with image thumbnails after exporting ......
Read more >Image resizing is exporting distorted - Bug
It appears you have a filter applied to the Master track. Click on the actual image clip and apply Size & Position filter...
Read more >IMAGE RESIZE WITHOUT DISTORTION - The Easy Way
Enlargement reduces picture quality, causing the modified image to seem fragmented or hazy. Suppose the picture aspect ratio is modified to fit.
Read more >How to scale up image into thumbnail without distorting it?
When using a smaller image as featured image (smaller than the thumbnail size, in width or height) it gets distorted to fill the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NetVips.Native v8.12.2 is now available with this fix included. Thanks for reporting this!
I don’t think we’ve found the right fix yet, unfortunately 😦 I’m poking about now.