[BUG] TIFFs saved with CMYK ColorSpace always get converted to 8-bit
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- cpp
- Domaine
- computer-graphics
Piste de recherche
Inspectez src/tiff.imageio/tiffoutput.cpp autour des lignes 721–722 et suivez la manière dont ImageSpec.format et TIFFTAG_BITSPERSAMPLE sont définis pour la sortie CMYK. Reproduisez le problème avec un ImageSpec UINT16 et tiff:ColorSpace défini sur CMYK, puis vérifiez avec exiftool, Mac Preview ou Photoshop que la sortie reste en 16 bits.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
When trying to save 16-bit data into a TIFF with CMYK color space applied, it outputs as 8-bit instead.
OpenImageIO version and dependencies
2.4.11.0
To Reproduce
Steps to reproduce the behavior:
- Create an ImageSpec with UINT16 format, and
tiff:ColorSpaceset to "CMYK" - Open ImageOutput with the spec
- Write 16-bit data to it
- Output file is 8-bit
Not sure how to reproduce this flow in oiiotool, but if someone can give me a command that does this I can try it out.
Evidence
Cannot attach specific images, but exiftool, Mac Preview, and Photoshop all confirm that the output is 8-bit.
IF YOU ALREADY HAVE A CODE FIX: There is no need to file a separate issue,
please just go straight to making a pull request.
I do not have a code fix specifically, but mainly opening this as a question on a portion of code I think is causing this. Specifically, this if statement will evaluate to true no matter what format is:
Because of this everything is getting converted to 8-bit. However, I'm not sure if it's trying to do this on purpose because there doesn't seem to be any handling for 16-bit values.
For reference, this is what my potential fix would be, but I am not in a position to test this properly right now and probably won't be soon which is why this is not a PR.
m_photometric = PHOTOMETRIC_SEPARATED;
if (m_spec.format == TypeDesc::UINT16) {
m_bitspersample = 16;
} else {
// Make everything else UINT8
m_spec.format = TypeDesc::UINT8;
m_bitspersample = 8;
}
TIFFSetField(m_tif, TIFFTAG_BITSPERSAMPLE, m_bitspersample);
TIFFSetField(m_tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
if (source_is_rgb(m_spec)) {
- Langage dominant
- C++
- Étoiles
- 2.4k
- Forks
- 727
- Merge moyen
- 4 j 8 h
- PR mergées (30 j)
- 67
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de AcademySoftwareFoundation/OpenImageIO
-
bug: Python ImageBuf.get_pixels(oiio.UNKNOWN) returns None silently or segfaultsPeut-être à nouveau libre @stevwya77 l’a pris il y a 10 jours, et aucune pull request n’est ouverte. Ouvertebug good first issue python
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
AcademySoftwareFoundation/OpenImageIO#5698 · 3 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
AcademySoftwareFoundation/OpenImageIO#5619 · 2 commentaires ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
AcademySoftwareFoundation/OpenImageIO#5570 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
AcademySoftwareFoundation/OpenImageIO#5558 ·
Les mainteneurs répondent en général sous 3 jours
-
define which color metadata OpenImageIO trusts, and when it resolves itPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
AcademySoftwareFoundation/OpenImageIO#5516 ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de AcademySoftwareFoundation/OpenImageIO
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
component: tabs platform: macOS
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
zen-browser/desktop#16860 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
windirstat/windirstat#776 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
godotengine/godot#125913 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100