Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Not able to set DPI for PNG files - libpng

Not able to set DPI for PNG files - libpng

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gopi Nath
    wrote on last edited by
    #1

    Hello Everyone, I am using libpng library for generating PNG files which is working fine. But it always generating with DPI 96 by default. I tried using png_set_pHYs for setting the resolution before calling png_write_png. But its not generating with the specified DPI. Before and after calling png_set_pHYs, i am checking the DPI using png_get_pHYs, it was showing the correct values whatever i set. What may be the issue? And is that possible to set DPI for PNG file? Please suggest. Regards, Gopinath.

    L 1 Reply Last reply
    0
    • G Gopi Nath

      Hello Everyone, I am using libpng library for generating PNG files which is working fine. But it always generating with DPI 96 by default. I tried using png_set_pHYs for setting the resolution before calling png_write_png. But its not generating with the specified DPI. Before and after calling png_set_pHYs, i am checking the DPI using png_get_pHYs, it was showing the correct values whatever i set. What may be the issue? And is that possible to set DPI for PNG file? Please suggest. Regards, Gopinath.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Gopi Nath wrote:

      What may be the issue?

      Without the source code of the library it is impossible to guess.

      G 1 Reply Last reply
      0
      • L Lost User

        Gopi Nath wrote:

        What may be the issue?

        Without the source code of the library it is impossible to guess.

        G Offline
        G Offline
        Gopi Nath
        wrote on last edited by
        #3

        That's the problem. they didn't provide source code nowhere.

        L 1 Reply Last reply
        0
        • G Gopi Nath

          That's the problem. they didn't provide source code nowhere.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Well you cannot expect anyone here to be able to guess what the code does. Try asking the people who produced the library.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups