Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 10.2.0
    • Labels:
      None

      Description

      Situation: Current file format options for image export in IGB are JPG, PNG, and SVG.

      Task: Investigate adding a fourth option, the PDF file format, to IGB image export.

        Attachments

          Activity

          Hide
          pkulzer Paige Kulzer added a comment -

          I downloaded the early access release of IGB from bioviz.org and tested this ticket on Mac. Images are saving properly as PDF and without distortions. The Save Image window remembers the name and file type of the last image I saved as expected.

          Everything looks good, closing this ticket!

          Show
          pkulzer Paige Kulzer added a comment - I downloaded the early access release of IGB from bioviz.org and tested this ticket on Mac. Images are saving properly as PDF and without distortions. The Save Image window remembers the name and file type of the last image I saved as expected. Everything looks good, closing this ticket!
          Hide
          ann.loraine Ann Loraine added a comment -

          PR merged. New installers are built and deployed to early access section of bioviz.org website. Reading for testing.

          Show
          ann.loraine Ann Loraine added a comment - PR merged. New installers are built and deployed to early access section of bioviz.org website. Reading for testing.
          Show
          pbhatia1 Pranav Bhatia (Inactive) added a comment - PR Submitted. https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/1063
          Hide
          pkulzer Paige Kulzer added a comment -

          Fetched Pranav's branch with his recent changes and tested on Mac. The Save Image window is now retaining the last used image format after closing and re-opening the window. The code now contains the updated version of PDFBox and a variable name has been fixed.

          Ready for PR!

          Show
          pkulzer Paige Kulzer added a comment - Fetched Pranav's branch with his recent changes and tested on Mac. The Save Image window is now retaining the last used image format after closing and re-opening the window. The code now contains the updated version of PDFBox and a variable name has been fixed. Ready for PR!
          Hide
          pbhatia1 Pranav Bhatia (Inactive) added a comment - - edited
          • Fixed the issue where the Save Image window defaulted to JPEG instead of PDF after saving an image in PDF format. Now, it retains the last used format consistently.
          • Updated PDFBox maven library to the latest version (3.0.4).
          • Embedding an SVG string instead of a JPEG while exporting PDF requires further investigation and is deferred for future scope.
          • The resolution of exported images appears to be an inherited IGB issue and is therefore out of scope.

          Branch - https://bitbucket.org/pranavbhatia1999/integrated-genome-browser/branch/IGBF-4012

          Show
          pbhatia1 Pranav Bhatia (Inactive) added a comment - - edited Fixed the issue where the Save Image window defaulted to JPEG instead of PDF after saving an image in PDF format. Now, it retains the last used format consistently. Updated PDFBox maven library to the latest version (3.0.4). Embedding an SVG string instead of a JPEG while exporting PDF requires further investigation and is deferred for future scope. The resolution of exported images appears to be an inherited IGB issue and is therefore out of scope. Branch - https://bitbucket.org/pranavbhatia1999/integrated-genome-browser/branch/IGBF-4012
          Hide
          nfreese Nowlan Freese added a comment -

          Tested Pranav's branch on Mac.

          Comments related to Paige's comments:

          • There should be a way for IGB to remember that pdf had been previously selected, probably need to add pdf as an option somewhere.
          • This may be worth exploring. We don't gray out the resolution options for SVG either, and the resolution does not apply to them.
            • As a side note and separate to this ticket, try using the default resolution to save an image as a png, then take the exact same image but with 4X the resolution. Open both images and zoom in. When I do this the images look identical. IGB is saving the higher resolution image at the higher resolution, but its as if there is no additional detail in the image. My guess is IGB is taking what is drawn at the default resolution and then just multiplies the pixels, similar to if you took a low resolution image and multiplied every pixel by 4.
          • I'm guessing you are creating a jpeg image file and then embedding it in the pdf. This might be okay, but I think it would be better if we could embed a vector graphic instead (effectively SVG). Not sure how easy this would be to do, though, and I don't want us to spend too much time on this. Pranav Bhatia - please take a look at the links below and give me a sense of if this would be possible. Alternatives would be to not make any changes, or attempt to increase the resolution of the embedded jpeg, though not sure if that will be possible (see my above comment).

          Code review:

          Show
          nfreese Nowlan Freese added a comment - Tested Pranav's branch on Mac. Comments related to Paige's comments: There should be a way for IGB to remember that pdf had been previously selected, probably need to add pdf as an option somewhere. This may be worth exploring. We don't gray out the resolution options for SVG either, and the resolution does not apply to them. As a side note and separate to this ticket, try using the default resolution to save an image as a png, then take the exact same image but with 4X the resolution. Open both images and zoom in. When I do this the images look identical. IGB is saving the higher resolution image at the higher resolution, but its as if there is no additional detail in the image. My guess is IGB is taking what is drawn at the default resolution and then just multiplies the pixels, similar to if you took a low resolution image and multiplied every pixel by 4. I'm guessing you are creating a jpeg image file and then embedding it in the pdf. This might be okay, but I think it would be better if we could embed a vector graphic instead (effectively SVG). Not sure how easy this would be to do, though, and I don't want us to spend too much time on this. Pranav Bhatia - please take a look at the links below and give me a sense of if this would be possible. Alternatives would be to not make any changes, or attempt to increase the resolution of the embedded jpeg, though not sure if that will be possible (see my above comment). See this stackoverflow and this other stackoverflow . Code review: Documentation for pdfbox pdfbox link in maven repository: https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox Pranav Bhatia - the version of pdfbox you have specified in the project pom (2.0.27) is older and has listed vulnerabilities. Can we use the more recent version 3.0.4?
          Hide
          pkulzer Paige Kulzer added a comment -

          Tested Pranav's commit on Mac, here are some things I noticed:

          • After saving an image in the JPEG format, that format is defaulted to when I open the Save Image window again. This is also true for the SVG and PNG file formats. However, this same behavior differs with the new PDF format. After saving an image in the PDF format, the JPEG format is defaulted to when I re-open the Save Image window.
          • There's no change in quality despite selecting different Resolution values. I'm guessing this is just a limitation of the PDF format? If so, maybe graying out the Resolution drop-down menu when the PDF format is selected would be good to do?
          • The resolution of exported PDF files, in general, is not great.
          • Sometimes the file I saved as PDF briefly shows up in the JPEG format in my File Finder before changing over to PDF. Is that expected behavior?

          Nowlan Freese, please do a brief code review of Pranav's commit, take a look at my notes here, then advise on next steps.

          Show
          pkulzer Paige Kulzer added a comment - Tested Pranav's commit on Mac, here are some things I noticed: After saving an image in the JPEG format, that format is defaulted to when I open the Save Image window again. This is also true for the SVG and PNG file formats. However, this same behavior differs with the new PDF format. After saving an image in the PDF format, the JPEG format is defaulted to when I re-open the Save Image window. There's no change in quality despite selecting different Resolution values. I'm guessing this is just a limitation of the PDF format? If so, maybe graying out the Resolution drop-down menu when the PDF format is selected would be good to do? The resolution of exported PDF files, in general, is not great. Sometimes the file I saved as PDF briefly shows up in the JPEG format in my File Finder before changing over to PDF. Is that expected behavior? Nowlan Freese , please do a brief code review of Pranav's commit, take a look at my notes here, then advise on next steps.
          Show
          pbhatia1 Pranav Bhatia (Inactive) added a comment - Link to commit - https://bitbucket.org/pranavbhatia1999/integrated-genome-browser/commits/3f5b590b03070039f78fa4a6916438e93ce37e83 Please review.

            People

            • Assignee:
              pbhatia1 Pranav Bhatia (Inactive)
              Reporter:
              pkulzer Paige Kulzer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: