Skip to main content
Participant
September 29, 2023
Question

Read layer details from photoshop Tiff file using libTiff library of c++.

  • September 29, 2023
  • 0 replies
  • 305 views

Hello Everyone.
Read and write the Adobe Photoshop(r) specific ImageResources (#34377) and ImageSourceData (#37724) TIFF tags.
I want to get the detail of layer
count, signature, blendmode, opacity, mask, name 

void ReadTIFFPhotoshopLayers(const char* inputPath, const char* outputPath) {
    TIFF* tif = TIFFOpen(inputPath, "r");
    if (tif) {
        char* data;
        uint32_t size;

        // Check for the TIFFTAG_IMAGESOURCEDATA (which is 37724)
        if (TIFFGetField(tif, TIFFTAG_IMAGESOURCEDATA, &size, &data)) {
           
        } else {
            std::cout << "Could not find Photoshop data in the TIFF file." << std::endl;
        }

        TIFFClose(tif);
    } else {
        std::cout << "Failed to open TIFF file." << std::endl;
    }
}


Please help me with this.

This topic is closed to new replies. Start a new post to keep the conversation going.