2 Replies Latest reply on Mar 5, 2014 7:11 AM by FrozenMushroom

    Writing Adobe Image Resource Block to a Tiff file

    FrozenMushroom


      Background :

       

       

      I am working on a small .NET application which reads the tiff file and performs some metadata related operations on it.

      The program works fine with all of the tiff Images that are taken from photoshop. I have recieved a tiff file from the client which does not work with the program.

      I checked the metadata info for the file using imagemagik following is the output

       

        Format: TIFF (Tagged Image File Format)

        Mime type: image/tiff

        Class: DirectClass

        Geometry: 6986x3754+0+0

        Resolution: 96x96

        Print size: 72.7708x39.1042

        Units: PixelsPerInch

        Type: TrueColorAlpha

        Base type: TrueColor

        Endianess: MSB

        Colorspace: sRGB

        Depth: 8-bit

        Channel depth:

          red: 8-bit

          green: 8-bit

          blue: 8-bit

          alpha: 8-bit

        Channel statistics:

          Red:

            min: 37 (0.145098)

            max: 255 (1)

            mean: 215.041 (0.843299)

            standard deviation: 48.8483 (0.191562)

            kurtosis: 0.845012

            skewness: -1.09632

          Green:

            min: 25 (0.0980392)

            max: 255 (1)

            mean: 213.399 (0.836859)

            standard deviation: 50.853 (0.199424)

            kurtosis: 0.908226

            skewness: -1.09806

          Blue:

            min: 21 (0.0823529)

            max: 255 (1)

            mean: 210.495 (0.825471)

            standard deviation: 53.6527 (0.210403)

            kurtosis: 0.124965

            skewness: -0.929882

          Alpha:

            min: 64 (0.25098)

            max: 255 (1)

            mean: 254.948 (0.999796)

            standard deviation: 2.56957 (0.0100768)

            kurtosis: 2437.44

            skewness: 49.3893

        Image statistics:

          Overall:

            min: 0 (0)

            max: 255 (1)

            mean: 159.747 (0.626458)

            standard deviation: 44.321 (0.173808)

            kurtosis: 48.4205

            skewness: -8.00071

        Rendering intent: Perceptual

        Gamma: 0.454545

        Chromaticity:

          red primary: (0.64,0.33)

          green primary: (0.3,0.6)

          blue primary: (0.15,0.06)

          white point: (0.3127,0.329)

        Background color: white

        Border color: srgba(223,223,223,1)

        Matte color: grey74

        Transparent color: none

        Interlace: None

        Intensity: Undefined

        Compose: Over

        Page geometry: 6986x3754+0+0

        Dispose: Undefined

        Iterations: 0

        Compression: LZW

        Orientation: TopLeft

        Properties:

          date:create: 2014-02-15T21:18:37+06:00

          date:modify: 2014-02-09T16:29:10+06:00

          signature: a5c4a9415437ee2d3b0c3d860b30c5367f73fe7553c3f54923caf6da4b9e4623

          tiff:alpha: unassociated

          tiff:endian: lsb

          tiff:photometric: RGB

          tiff:rows-per-strip: 3754

        Artifacts:

          filename: C:\Users\Jane\TiffPathOperation\bin\Debug\Example1client_no_path.tiff

          verbose: true

        Tainted: False

        Filesize: 14.6MB

        Number pixels: 26.23M

        Pixels per second: 54.64MB

        User time: 0.484u

        Elapsed time: 0:01.479

        Version: ImageMagick 6.8.7-4 2013-10-26 Q16 http://www.imagemagick.org

       

       

      Unlike other tiff images this image does not contain 8bim profile information, which is required for proper execution of the program

       

      Profiles:

        Profile-8bim: 11720 bytes

        Profile-icc: 3144 bytes

          Description: sRGB IEC61966-2.1

          Manufacturer: IEC http://www.iec.ch

          Model: IEC 61966-2.1 Default RGB colour space - sRGB

          Copyright: Copyright (c) 1998 Hewlett-Packard Company

        Profile-xmp: 19368 bytes

       

       

      Possible solution :

      I would have to add the Image resource block data to such image in which the profile information is missing.

       

       

      Problem :

      I would have to write metadata for the tag 34377 as given in the Adobe Specification for the listed resource Id

      How am I suppose to write this entire block and assign it to the Tag 34377 in C#?
      What values should be added for each resource Id ?   

       

       

      Tiff Image : http://1drv.ms/NtzbCr

        • 1. Re: Writing Adobe Image Resource Block to a Tiff file
          Silkrooster Adobe Community Professional & MVP

          I would think instead of adding metadata to the file, use an if statement to check if that tag is missing, then take steps to bypass that portion of the file.

          I certainly do not know enough about the tiff format to be of any real help, but I would think that checking for missing tags is doable.

          • 2. Re: Writing Adobe Image Resource Block to a Tiff file
            FrozenMushroom Level 1

            Bypassing the portion of the file is not a option in my case since a part

            of the program reads the bytes and performs operation on the image when it

            reads 8bim.

             

            The image if re-saved in Photoshop gets the required metadata. (Can be seen

            by using imagemagik's identify utility)

             

            Only option that I have is to write the information for the resource in

            side the Image resource block tag.

             

            How am I suppose to write this resources when I am using BitmapMetadata

            class?

             

            Regards,

            Charanraj Golla