FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

Problem with view 5K file FliF #392

Open Jamaika1 opened 7 years ago

Jamaika1 commented 7 years ago

Hi team FliF

I don't know where is error, but viewflif doesn't open file. I have such a question. Are you planning to add the metadata functions XMP, ICC, ExiF? There is also no #include "functional" in flif-dec.cpp

Regards

saschanaz commented 7 years ago

The \<functional> is added by #387 :tada:, the metadata thing was being tracked by #17 and is documented on https://github.com/FLIF-hub/FLIF/blob/master/doc/metadata.

Jamaika1 commented 7 years ago

Thanks for answer. The isn't added in file: https://github.com/FLIF-hub/FLIF/archive/master.zip I don't know, how add file TIFF with metadata?

saschanaz commented 7 years ago

Haven't tried it yet but the console message says you can pass .icc/.xmp/.exif file together when encoding. https://github.com/FLIF-hub/FLIF/blob/bf330d4d6aa1649c53eb39bda762b37c3f90bf18/src/flif.cpp#L256

jonsneyers commented 7 years ago

The encoder doesn't support TIFF as input format, only PPM/PAM and PNG. You can use ImageMagick to convert your TIFF file to e.g. PPM and separate metadata files. I think convert input.tiff image.ppm; convert input.tiff metadata.exif should work (if the TIFF file contains Exif metadata).

Then you can encode it to FLIF using flif image.ppm metadata.exif output.flif.

PNG files containing ICC profiles and/or XMP metadata are automatically converted to FLIF files with the same metadata.

Jamaika1 commented 7 years ago

Thanks for answer. Unfortunately, TIFF or RAW can't separate .exif. Programs don't read .exif. Now I know about differences in version ExiF and incompatibility of programs. convert.exe image.tiff image.exif

convert.exe: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/925.
convert.exe: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/925.
convert.exe: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/925.
convert.exe: no APP1 data is available `L1004432.exif' @ error/meta.c/WriteMETAImage/2350.
jonsneyers commented 7 years ago

Maybe try with Exiftool?

Jamaika1 commented 7 years ago

This is it. I use version exiftool 10.49. _exiftool.exe image.tiff -o image.exif/icc/xmp flif.exe -e -v -o -k -E100 -N -Q100 -K -W -P512 image.ppm image.exif image.icc image.xmp RGB48_losslessRGB48.flif exiftool.exe RGB48losslessRGB48.flif

ExifTool Version Number         : 10.49
File Name                       : RGB48_losslessRGB48.flif
Directory                       : .
File Size                       : 23 MB
File Modification Date/Time     : 2017:04:13 18:50:27+02:00
File Access Date/Time           : 2017:03:27 07:58:55+02:00
File Creation Date/Time         : 2017:03:27 07:58:55+02:00
File Permissions                : rw-rw-rw-
File Type                       : FLIF
File Type Extension             : flif
MIME Type                       : image/flif
Image Type                      : RGB (non-interlaced)
Bit Depth                       : 8
Image Width                     : 5212
Image Height                    : 3468
Profile CMM Type                : ADBE
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1999:06:03 00:00:00
Profile File Signature          : acsp
Primary Platform                : Apple Computer Inc.
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : none
Device Model                    :
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : ADBE
Profile ID                      : 0
Profile Copyright               : Copyright 1999 Adobe Systems Incorporated
Profile Description             : Adobe RGB (1998)
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Tone Reproduction Curve     : (Binary data 14 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 14 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 14 bytes, use -b option to extract)
Red Matrix Column               : 0.60974 0.31111 0.01947
Green Matrix Column             : 0.20528 0.62567 0.06087
Blue Matrix Column              : 0.14919 0.06322 0.74457
XMP Toolkit                     : Image::ExifTool 10.49
Color Space                     : Uncalibrated
Contrast                        : Normal
Date/Time Original              : 2009:10:20 09:10:46
Digital Zoom Ratio              : 0
Exif Version                    : 0230
Exposure Compensation           : 0
Exposure Mode                   : Manual
Exposure Program                : Manual
Exposure Time                   : 1/180
File Source                     : Digital Camera
Flash Fired                     : False
Flash Function                  : False
Flash Mode                      : Unknown
Flash Red Eye Mode              : False
Flash Return                    : No return detection
Focal Length                    : 21.0 mm
Focal Length In 35mm Format     : 21 mm
Focal Plane Resolution Unit     : inches
Focal Plane X Resolution        : 3700
Focal Plane Y Resolution        : 3689
ISO                             : 160
Image Unique ID                 : 00000000000000000000000000001220
Light Source                    : Other
Max Aperture Value              : 2.8
Metering Mode                   : Center-weighted average
Saturation                      : Normal
Scene Capture Type              : Standard
Scene Type                      : Directly photographed
Shutter Speed Value             : 1/180
White Balance                   : Manual
Serial Number                   : *******
Date Created                    : 2009:10:20
Bits Per Sample                 : 8, 8, 8
Compression                     : Uncompressed
Make                            : Leica Camera AG
Camera Model Name               : M9 Digital Camera
Photometric Interpretation      : RGB
Planar Configuration            : Chunky
Samples Per Pixel               : 3
Software                        : 1.002
Create Date                     : 2009:10:20 09:10:46
Creator Tool                    : 1.002
Metadata Date                   : 2017:04:12 17:15:56+02:00
Modify Date                     : 2017:04:12 17:15:56
Rating                          : 0
Encoding                        : FLIF16
Flash                           : No Flash
Image Size                      : 5212x3468
Megapixels                      : 18.1
Scale Factor To 35 mm Equivalent: 1.0
Shutter Speed                   : 1/180
Circle Of Confusion             : 0.030 mm
Field Of View                   : 81.2 deg
Focal Length                    : 21.0 mm (35 mm equivalent: 21.0 mm)

https://www.sendspace.com/filegroup/eFZv3RF2F4poQ1YVy5%2Fb%2B1raAM5X%2BW9X

hrj commented 7 years ago

@Jamaika1 Did the problem get solved? Can this issue be closed?

Jamaika1 commented 7 years ago

I haven't been able to solve the problem in Windows. I am waiting for updates. My tests and observations are in the file rar/.bat of the created codecs: http://forum.doom9.org/showthread.php?t=174300 PS: You can always close the topic. You are the creator. ;)