Skip to content
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

Corrupted output: TIFF&PNG properties #2

Closed
darwinjob opened this issue Jun 11, 2020 · 3 comments
Closed

Corrupted output: TIFF&PNG properties #2

darwinjob opened this issue Jun 11, 2020 · 3 comments

Comments

@darwinjob
Copy link
Owner

darwinjob commented Jun 11, 2020

TIFF images with these properties:

Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: PseudoClass
Geometry: 15184x10224+0+0
Resolution: 1.55039x1.55039
Print size: 9793.68x6594.48
Units: Undefined
Colorspace: sRGB
Type: Palette
Endianess: MSB
Depth: 8/16-bit
Channel depth:
Red: 1-bit
Green: 16-bit
Blue: 1-bit

produce corrupted pyramids. The lowest pyramid level (no scale) is ok but all the others look like this:
20200126_nexNeg_cherry_SM_iue_17684_1_scale60_01 png_1024

After reconverting with IM -define tiff:tile-geometry=256x256 -type TrueColor -depth 8 -compress LZW:

Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 15184x10224+0+0
Resolution: 1.55039x1.55039
Print size: 9793.68x6594.48
Units: Undefined
Colorspace: sRGB
Type: Palette
Base type: TrueColor
Endianess: LSB
Depth: 8-bit
Channel depth:
Red: 1-bit
Green: 8-bit
Blue: 1-bit

pyramids are ok.

@darwinjob darwinjob changed the title Non equal channel depths not supported Corrupted output Jun 11, 2020
@darwinjob darwinjob changed the title Corrupted output Corrupted output: TIFF properties Jun 11, 2020
@darwinjob
Copy link
Owner Author

darwinjob commented Jun 11, 2020

This PNG fails the same way:

Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: PseudoClass
Geometry: 9110x6134+0+0
Units: Undefined
Colorspace: sRGB
Type: Palette
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Red: 1-bit
Green: 8-bit
Blue: 1-bit

After applying IM -define png:bit-depth=8 -define png:color-type=2 it becomes:

Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 9110x6134+0+0
Units: Undefined
Colorspace: sRGB
Type: Palette
Base type: Undefined
Endianess: Undefined
Depth: 8-bit
Channel depth:
Red: 1-bit
Green: 8-bit
Blue: 1-bit

and then the pyramid is ok. The main suspect is the indexed color: Class: PseudoClass, DirectClass

@darwinjob darwinjob changed the title Corrupted output: TIFF properties Corrupted output: TIFF&PNG properties Jun 11, 2020
@darwinjob
Copy link
Owner Author

TODO: forward this to https://forum.image.sc/tags/c/usage-issues/7/bio-formats

@darwinjob
Copy link
Owner Author

This relates to #14
Currently the issue has a workaround: -rgb parameter to force the input image to be converted to RGB888 on a fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant