When opening a PNG image file converted by Imagemagick, a part of the image is missing  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
rakunavi
User
Posts: 2258
Joined: Sat Sep 11, 2021 5:04 am

When opening a PNG image file converted by Imagemagick, a part of the image is missing

Post by rakunavi »

=== UPDATE ===================================================================
The issue reported below has been resolved in Ver 10.1.0 build 380.
I appreciate all the hard work and efforts of the support and development team.
==============================================================================


Hello all,

I have found that when convering PNG image files (*) using the convert or mogrify commands in Imagemagick, PDF-XChange Editor will not handle it correctly.
(*) As described below, the problem occurs only with PNG files under certain conditions.

The same file can be opened in Acrobat X, so at least the file format should be correct enough for Acrobat to handle. I have also checked all other imaging software, such as GIMP and Microsoft Paint, to see if they can open the converted file correctly in Imagemagick, and all but PDF-XChange Editor were able to open it correctly.

The verification procedure and video are shown below.

  1. First, use "Export to image(s)" feature in PDF-XChange Editor to create the source PNG file. In the video, the first page of the license file "PDFXLicense.pdf", which exists in the PDF-XChange Editor installation folder, is saved as an image file in 8bit grayscale at 150dpi. The image types that cause issues are listed below.

    • Black&White
    • Indexed (1bpp)
    • Indexed (2bpp)
    • Indexed (4bpp)
    • Indexed (8bpp)
    • Gray (8bpp)
    • Gray (16bpp)
    • Gray with Alpha (8bpp)
    • Gray with Alpha (16bpp)
    • True Color (24bpp)
    • True Color (48bpp)
    • Next, the Imagemagick command is applied to the output PNG file. In the video, I have tried to simplify the conditions and applied the "mogrify" command without any options. Of course, the problem still occurs if you run the command with the options. If you run the "convert" command instead of the "mogrify" command, the result will be the same.
      ------ "PDFXLicense_1.png" in the attached file is the file after applying the mogrify command.

      Code: Select all

      mogrify PDFXLicense_1.png
      • Open the PNG file converted by Imagemagick in the PDF-XChange Editor. Check that only a small area of the top of the page is visible and the rest of the page is black. If the image type is Indexed (2bpp, 4bpp, 8bpp), the black areas are displayed in white.
        ------ "PDF-XCE.pdf" in the attached file is the PDF file saved in PDF-XChange Editor at this time.
        • Open the same file in Acrobat. Check that all areas of the file are correctly displayed.
          ------ "AcrobatX.pdf" in the attached file is the PDF file saved in Acrobat X at this time.
        • Animation.gif
        • SampleFiles.zip
        For reference, I have tested all image types that can be set for PNG in the "Export to image(s)" feature of PDF-XChange Editor. A combined file of all of them is also attached. As you can see, this problem occurs when a conversion is performed on an image other than True Color with Alpha (32bpp/64bpp).

        • summary.png
        • Summary.zip
        Note that in some PC environments, the above procedure may not cause problems. In that case, please add the following procedure between steps 1 and 2 above. A verification video including this additional procedure is also included for reference. The image editing software used in this case is limited to some extent. For example, XnView Classic can be used in addition to GIMP (it can reproduce the problem). However, Microsoft Paint cannot be used (it cannot reproduce the problem).

        • 1.5. Open the output PNG file with image software such as GIMP, crop, delete areas, etc., add some edits, and then overwrite and save the file in the same format as the input format.
        • Animation2.gif
        Hoping that the above information will be of some help to you.
        Thank you so much for your continued support.

        Best regards,
        rakunavi

        - PDF-XChange Editor Plus Version: 10.0.1 build 371
        - Imagemagick Version: 7.1.1-15-Q16-HDRI-x64-dll for Windows
        - GIMP Version: 2.10.34, XnView Classic Version: 2.51.2
        - OS Version: Windows 11 Home 22H2 Build 22621.1992
        - PC Model: Lenovo IdeaPad C340-15IWL, HP All-in-One 22-c0xx
        You do not have the required permissions to view the files attached to this post.
        Last edited by rakunavi on Wed Sep 06, 2023 7:42 am, edited 1 time in total.
        Top needs for PDFXCE
        forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
        forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
        forum.pdf-xchange.com/viewtopic.php?t=37353 FullScrnMultiMon
        forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
        User avatar
        Daniel - PDF-XChange
        Site Admin
        Posts: 13161
        Joined: Wed Jan 03, 2018 6:52 pm

        Re: When opening a PNG image file converted by Imagemagick, a part of the image is missing  SOLVED

        Post by Daniel - PDF-XChange »

        Hello, rakunavi

        You will be happy to know that this issue is already fixed, it seems the dev team spotted the issue not too long ago! It will be implemented with the next release, so please keep an eye out!

        Kind regards,
        Dan McIntyre - Support Technician
        PDF-XChange Co. LTD

        +++++++++++++++++++++++++++++++++++
        Our Web site domain and email address has changed as of 26/10/2023.
        https://www.pdf-xchange.com
        [email protected]
        User avatar
        rakunavi
        User
        Posts: 2258
        Joined: Sat Sep 11, 2021 5:04 am

        Re: When opening a PNG image file converted by Imagemagick, a part of the image is missing

        Post by rakunavi »

        Hello Daniel,

        Thank you for your quick reply. I am looking forward to future updates. Please give my best regards to the developer.

        Best regards,
        rakunavi
        Top needs for PDFXCE
        forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
        forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
        forum.pdf-xchange.com/viewtopic.php?t=37353 FullScrnMultiMon
        forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
        User avatar
        Daniel - PDF-XChange
        Site Admin
        Posts: 13161
        Joined: Wed Jan 03, 2018 6:52 pm

        When opening a PNG image file converted by Imagemagick, a part of the image is missing

        Post by Daniel - PDF-XChange »

        :)
        Dan McIntyre - Support Technician
        PDF-XChange Co. LTD

        +++++++++++++++++++++++++++++++++++
        Our Web site domain and email address has changed as of 26/10/2023.
        https://www.pdf-xchange.com
        [email protected]