-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Normalizing PNGs: Zlib::BufError: buffer error #598
Comments
With which version of JRuby does the problem manifest? Does this happen on all PNG files? The picture you indicated seems to be invalid. Is there another one we can try? |
The problem occurs with JRuby 1.7.3 (haven't tried any other versions). This does not happen with all PNG files. I know that the picture looks 'invalid', as I described above it has been pre-compiled by Xcode (see http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html for more information), so it will look invalid to any other application. That is why I need to apply the normalizing in the first place. Again, MRI can handle this exact same image, while JRuby does not. |
It works for me on 1.7.3 as well as master.
I wonder what might be causing you grief. |
Oh, I'm sorry, I should have explained how that script works. It expects a folder as input. This should clarify things:
|
Thanks. I confirmed the error. |
This still fails with JRuby 1.7.18
but works on master
|
This works in 9k and we will never fix this in 1.7.x as it is winding down....resolving. |
Intro
Apple uses some pre-compilation (basically byte swapping) on PNG files stored inside an iOS app. To reverse these changes, there exists code like this: https://github.com/swcai/iphone-png-normalizer/blob/master/iphonepng.rb. Running this particular script with MRI succeeds, but fails with JRuby for some images.
Error
Particularly with this image (
) I get the following error. Note that this image appears to be broken here, because of the byte swapping mentioned above. Also note that MRI (1.9.3) doesn't choke on it.
The text was updated successfully, but these errors were encountered: