-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JPEG image is "blocky" #17
Comments
Hm, seems like library no longer maintained... |
Thanks @oliver-moran, and sorry for the delayed response. Could you confirm this issue still exists after recent updates? |
@benwiley4000 I'm a maintainer on jimp and running @oliver-moran code with the image. Blocky-ness seems to be gone now! |
Cool! |
IDK if it's fully fixed though. I found another issue where encoding and decoding right after one another produces a slightly different image. const fs = require('fs')
const jpeg = require('jpeg-js');
const jpegData = fs.readFileSync('./exampleImages/npm.jpg');
const rawImageData = jpeg.decode(jpegData);
const jpegImageData = jpeg.encode(rawImageData, 100);
const Jimp = require('jimp')
fs.writeFileSync('./out.jpg', jpegImageData.data) I know it's not super noticable, but if you zoom in on the u in |
Ok I'll reopen |
It almost looks like its grouping together 4 pixels and only using 1 color from the 4 |
The original issue may have been related to and partially fixed by #25 if they were progressive JPEGs. If not, probably separate issue we should try to hunt down :) Given jimp-dev/jimp#121, it seems like it's still definitely on the decoding side not encoding side? |
yeah that makes sense since it happens when just decoding and then encoding to another format |
First, thanks very much for your library, which I am using in Jimp. Without this library and
pngjs
Jimp would not be possible.An issue was raised about the picture below being "blocky" when it is decoded (especially the blurry background elements): jimp-dev/jimp#134
A test case using Jimp is as follows:
If I convert the image to a PNG using GIMP and perform the same test on that image then the issue doesn't present. For that reason I think the issue lies here.
The text was updated successfully, but these errors were encountered: