perl GD Image resolution problem

Discussion in 'Perl Misc' started by Zhiliang Hu, May 6, 2008.

  1. Zhiliang Hu

    Zhiliang Hu Guest

    Zhiliang Hu, May 6, 2008
    #1
    1. Advertising

  2. Zhiliang Hu

    Guest

    Zhiliang Hu <> wrote:
    > I use GD::Image to create figures. Here is an example:
    > http://sphinx.vet.unimelb.edu.au/QTLdb/tmp/map490151833.png
    >
    > For publication purposes we need high resolution pictures. I am
    > seeking expert advice as how can I improve the resolution?


    Hi Zhiliang,

    The resolution of a png is one pixel per pixel. You can't get any higher
    than that! You should be able to make the entire image larger, for example
    by specifying a larger array when you call new on your GD object.
    Currently it is 360x402, you could try doubling each.

    Or you may need to switch to something other than png, like svg using
    GD::SVG.

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
     
    , May 6, 2008
    #2
    1. Advertising

  3. Zhiliang Hu

    zentara Guest

    On Mon, 5 May 2008 20:28:15 -0700 (PDT), Zhiliang Hu
    <> wrote:

    >I use GD::Image to create figures. Here is an example:
    >http://sphinx.vet.unimelb.edu.au/QTLdb/tmp/map490151833.png
    >
    >For publication purposes we need high resolution pictures. I am
    >seeking expert advice as how can I improve the resolution?
    >
    >Thanks in advance!
    >
    >Zhiliang


    Use a camera with more mega-pixels, and set it to the highest
    resolution. ( Usually the largest picture, allowing fewest pictures
    in storage).

    If you take a low resolution photo, and use a program to make it larger,
    each pixel will be duplicated with the same color, to accomodate the
    larger size. So the picture will be larger, but the resolution will not
    improve.

    Resolution comes from the camera's megapixel count and settings.

    zentara

    --
    I'm not really a human, but I play one on earth.
    http://zentara.net/japh.html
     
    zentara, May 6, 2008
    #3
  4. Zhiliang Hu

    Zhiliang Hu Guest

    Many thanks for all your hints. That'll be useful.

    --
    Zhiliang
     
    Zhiliang Hu, May 6, 2008
    #4
  5. Zhiliang Hu

    zentara Guest

    On Tue, 6 May 2008 08:29:09 -0700 (PDT), Zhiliang Hu
    <> wrote:

    >Many thanks for all your hints. That'll be useful.


    I just looked at your sample output, and since it's lines and
    text, you could use the Scalable Vector Graphics format, or
    ..svg

    GD has svg output with the module
    http://search.cpan.org/~twh/GD-SVG-0.28/SVG.pm

    SVG files look like xml, and will change resolution
    automatically to adjust to window size.

    Google for svg for more info.

    zentara


    --
    I'm not really a human, but I play one on earth.
    http://zentara.net/japh.html
     
    zentara, May 7, 2008
    #5
  6. Zhiliang Hu

    Ben Bullock Guest

    On May 7, 10:22 pm, zentara <> wrote:

    > SVG files look like xml


    That's because they are XML.
     
    Ben Bullock, May 7, 2008
    #6
  7. Zhiliang Hu

    Zhiliang Hu Guest

    Yes, I do find SVG an interesting tool. I spent some time on it...
    ang wonder is there a good tutorial on how to use it? (for example I
    made it produce xml like files but not yet viewable on web; Yet to get
    fonts to work, etc.)

    Many thanks for all who replied with suggestions. These did give me
    some insights. Appreciate it.

    Zhiliang
     
    Zhiliang Hu, May 10, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew FPGA
    Replies:
    0
    Views:
    987
    Andrew FPGA
    Sep 26, 2005
  2. Bomb Diggy
    Replies:
    1
    Views:
    865
    Marco Schmidt
    Oct 21, 2003
  3. Glenn Jarvis

    Image - Screen Resolution

    Glenn Jarvis, Feb 13, 2004, in forum: HTML
    Replies:
    5
    Views:
    2,208
  4. Michael Tonelli

    image dependant on resolution

    Michael Tonelli, Jul 21, 2004, in forum: HTML
    Replies:
    11
    Views:
    694
    Andy Dingley
    Jul 23, 2004
  5. dentaku
    Replies:
    1
    Views:
    2,053
Loading...

Share This Page