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

TIFF without thumbnail #1055

Open
IwoMk opened this issue Apr 5, 2024 · 6 comments
Open

TIFF without thumbnail #1055

IwoMk opened this issue Apr 5, 2024 · 6 comments

Comments

@IwoMk
Copy link

IwoMk commented Apr 5, 2024

Hello, please can you save TIFF without preview.

When I want to save an image in *.TIF, it is saved with preview. I can't use this format because of the limitations of my project. I am limited to uncompressed TIFF without preview.

Also, the verification application tells me that the file is not valid after saving. Please change the saving mechanism to make the TIFF file valid according to the Open Preservation Foundation (JHOVE). Thank you very much in advance.

https://jhove.openpreservation.org/modules/tiff/

I am attaching printscreen - the output from Jhove: 0328.tif is the original TIFF file and 0328nomacs.tif is saved in Nomacs with nocompression.

printscreen

@leejuyuu
Copy link
Collaborator

Hello @IwoMk, are you certain that the thumbnail is the cause, or is it a speculation? I've read the validity section of the link you provided, and I did not find anything related to the thumbnail. Does your tool report which validity rule this image violates?

@IwoMk
Copy link
Author

IwoMk commented Apr 29, 2024

Hello, no. I don't know.

It's possible there are two problems:

  1. The input file is without thumbnail, but after saving in Nomacs it is with thumbnail. I need it to be without thumbnail again.
  2. The input file is valid, but after saving in Nomacs it is not valid.

I have a colleague, he knows JHOVE better. I'll try to ask him if he can identify the problem with validity.

@leejuyuu
Copy link
Collaborator

leejuyuu commented May 1, 2024

Reproduced with nomacs 3.12 on Ubuntu 22.04.

JHOVE output
Jhove (Rel. 1.20.0, 2019-01-19)
 Date: 2024-05-01 23:33:24 CST
 RepresentationInformation: image.tiff
  ReportingModule: TIFF-hul, Rel. 1.8 (2017-05-11)
  LastModified: 2024-04-27 17:48:54 CST
  Size: 679312
  Format: TIFF
  Version: 6.0
  Status: Well-Formed, but not valid
  SignatureMatches:
   TIFF-hul
  InfoMessage: Unknown TIFF IFD tag: 11
   Offset: 194
  InfoMessage: TIFF compression scheme 6 is deprecated
  ErrorMessage: PhotometricInterpretation not defined
  ErrorMessage: ImageWidth not defined
  ErrorMessage: ImageWidth not defined
  ErrorMessage: Neither strips nor tiles defined
  ErrorMessage: Neither strips nor tiles defined
  MIMEtype: image/tiff
  Profile: Baseline RGB (Class R)
  TIFFMetadata: 
   ByteOrder: little-endian
   IFDs: 
    Number: 2
    IFD: 
     Offset: 8
     Type: TIFF
     Entries: 
      NisoImageMetadata: 
       FormatName: image/tiff
       ByteOrder: little_endian
       CompressionScheme: uncompressed
       ImageWidth: 626
       ImageHeight: 358
       ColorSpace: RGB
       ReferenceBlackWhite: 0, 255, 0, 255, 0, 255
       Orientation: normal
       SamplingFrequencyUnit: inch
       XSamplingFrequency: 96
       YSamplingFrequency: 96
       BitsPerSample: 8, 8, 8
       BitsPerSampleUnit: integer
       SamplesPerPixel: 3
      NewSubfileType: 0
      SampleFormat: 1, 1, 1
      MinSampleValue: 0, 0, 0
      MaxSampleValue: 255, 255, 255
      TransferRange: 0, 255, 0, 255, 0, 255
      Threshholding: 1
      TIFFITProperties: 
       BackgroundColorIndicator: background not defined
       ImageColorIndicator: image not defined
       TransparencyIndicator: no transparency
       PixelIntensityRange: 0, 255
       RasterPadding: 1 byte
       BitsPerRunLength: 8
       BitsPerExtendedRunLength: 16
    IFD: 
     Offset: 246
     Type: TIFF
     Entries: 
      NisoImageMetadata: 
       FormatName: image/tiff
       ByteOrder: little_endian
       CompressionScheme: JPEG
       Orientation: normal
       BitsPerSample: 1
       BitsPerSampleUnit: integer
       SamplesPerPixel: 1
      NewSubfileType: 0
      SampleFormat: 1
      MinSampleValue: 0
      MaxSampleValue: 1
      Threshholding: 1
      JPEGInterchangeFormat: 288
      JPEGInterchangeFormatLength: 6700
      TIFFITProperties: 
       BackgroundColorIndicator: background not defined
       ImageColorIndicator: image not defined
       TransparencyIndicator: no transparency
       PixelIntensityRange: 0, 1
       RasterPadding: 1 byte
       BitsPerRunLength: 8
       BitsPerExtendedRunLength: 16

The problem seems to be the thumbnail IFD missing some tags. But that IFD should be an EXIF IFD, I'm still unsure if this is a bug of nomacs or JHOVE.

@IwoMk
Copy link
Author

IwoMk commented May 2, 2024

@leejuyuu Would it be possible to make a checkbox in settings Nomacs to not create a thumbnail for the tiff file?

If it could be saved file without a thumbnail, we'll see so if the bug in JHOVE is removed and a file is valid.

@IwoMk
Copy link
Author

IwoMk commented May 2, 2024

I saved the tiff file in Nomacs and then saved it again in XnView Classic, result:

JhoveView (Rel. 1.28.0, 2023-05-18)
 Date: 2024-05-02 08:54:32 CEST
 RepresentationInformation: d:\offline\image.tif
  ReportingModule: TIFF-hul, Rel. 1.9.4 (2023-03-16)
  LastModified: 2024-05-02 08:52:21 CEST
  Size: 14305780
  Format: TIFF
  Version: 5.0
  Status: Not well-formed
  SignatureMatches:
   TIFF-hul
  ErrorMessage: IFD offset not word-aligned: 14232871
   ID: TIFF-HUL-59
  ErrorMessage: Value offset not word-aligned: 14233045
   ID: TIFF-HUL-4
   Offset: 14232905
  ErrorMessage: Value offset not word-aligned: 14233051
   ID: TIFF-HUL-4
   Offset: 14232941
  ErrorMessage: Value offset not word-aligned: 14233091
   ID: TIFF-HUL-4
   Offset: 14232977
  ErrorMessage: Value offset not word-aligned: 14233131
   ID: TIFF-HUL-4
   Offset: 14232989
  ErrorMessage: Value offset not word-aligned: 14233139
   ID: TIFF-HUL-4
   Offset: 14233001
  ErrorMessage: Value offset not word-aligned: 14233147
   ID: TIFF-HUL-4
   Offset: 14233037
  MIMEtype: image/tiff
  Profile: Baseline RGB (Class R), DLF Benchmark for Faithful Digital Reproductions of Monographs and Serials: color
  TIFFMetadata: 
   ByteOrder: little-endian
   IFDs: 
    Number: 2
    IFD: 
     Offset: 8
     Type: TIFF

When I save the file only in XnView Classic, the file is valid. Does that help?

(Xnview writes its own EXIF field Software, normally I can't use it.)

@leejuyuu
Copy link
Collaborator

leejuyuu commented May 3, 2024

@leejuyuu Would it be possible to make a checkbox in settings Nomacs to not create a thumbnail for the tiff file?

Because your goal is to make the resulting tiff file valid instead of removing the thumbnail, it feels more straightforward to fix the validity instead of creating a new feature to work around this.

When I save the file only in XnView Classic, the file is valid. Does that help?

I think the key here is to find a way (or some other software) to write EXIF thumbnails to tiff files in a way that is valid for JHOVE.

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

No branches or pull requests

2 participants