Comments (5)
Looks like it's embedding two iCCP (color management) chunks, which is invalid. Most likely, the editing software takes one of them out of the image before resaving. Do you have an example file to verify?
from image.
I'm also running into this problem in my project. Can reproduce in a blank project with
fn main() {
image::open("wafles-mine.png").unwrap();
}
Versions:
- image 0.24.5
- png 0.17.7
from image.
$ pngfix /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
zTXt OK maximum 15 15 10002 21457 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
iCCP OK default 15 15 2595 3144 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
iCCP OK default 12 12 2595 3144 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
IDAT OK maximum 15 15 4987 16448 /tmp/203021635-572a99fb-cf36-4a89-8281-58328567cec3.png
This is supposed to be valid?
Unless a cICP chunk exists, a PNG datastream should contain at most one embedded profile, whether specified explicitly with an iCCP or implicitly with an sRGB chunk.
Suppose we interpret should too strongly and should rather ignore the duplicate? After all, the chunk is technically not critical but that seems like a potential hazard to me if we only report one.
An iCCP chunk contains zlib/deflate compressed data. The two chunks are both identified as Photoshop ICC profile
and start with bytes 48 89
and 78 9C
respectively, meaning two different compression settings had been used in their creation. Still, most data actually ends up being the same. Is that the same data, which is short enough to be mostly unaffected by the window size?
from image.
Suppose we interpret should too strongly and should rather ignore the duplicate?
I think so
Still, most data actually ends up being the same. Is that the same data, which is short enough to be mostly unaffected by the window size?
I'm not sure what data you mean here. The zlib/deflate compressed data of the iCCP chunk? What does it have to do with the window size? (disclaimer: I haven't delved into image formats before)
from image.
That issue has only started happening with 0.17.4, which makes sense, because image-rs/image-png#334 was merged by then
from image.
Related Issues (20)
- when handle 16bit grayscale images, DynamicImage::inner_bytes() does not work correctly HOT 2
- Decoding TIFF images as 1 bit black/white images with Fax4 compression HOT 4
- Unclear return values for GenericImageView::bounds
- Implement compression control in other formats HOT 2
- Access ICC profile data HOT 1
- Fails to build with lto=true in aarch64 architectures. HOT 2
- Fails to decode tga image with "Image is too large" error HOT 2
- Transparent background 'Png' to white background 'Jpg' HOT 2
- Some modern ico-formats will be rejected HOT 5
- JPEG/PNG compression level / settings option (new Enum options ?) HOT 6
- Can't load image from byte slice HOT 2
- Allow using `zune-jpeg` for JPEG decoding HOT 9
- Better handling of ExtendColorType images HOT 2
- Allow using `zune-png` for PNG decoding HOT 21
- Pixel access naming conventions HOT 3
- Source slice length (1548) does not match destination slice length (774) in JpegDecoder HOT 12
- cannot decode AVIF images HOT 1
- Lossy WEBP with alpha: source slice length (761600) does not match destination slice length (997920) HOT 4
- Resize Performance vs swift HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image.