How to display png image on plplot window

2009-03-16
2013-03-15
  • subrahmanyam gurram

    Hi,

        Can we display png image on plplot graph window ?

    Thanks
    Subrahmanyam

     
    • Werner Smekal

      Werner Smekal - 2009-03-16

      Hi,

      you would need plimage or plimagefr - http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.2/plimage.html .  Look also at example 20. You need to load the png image before into an 2d array. You might use libpng or th gd library for that. These two libraries are known to work also with Borland c++.

      Regards,
      Werner

       
    • subrahmanyam gurram

      Hi Werner,
            
               In example x20, we are displaying gray pgm image. Can you please tell me how to display colored png image on plplot window.

      Thanks
      Subrahmanyam

       
      • Werner Smekal

        Werner Smekal - 2009-04-08

        Hi,

        I can't help you here. As I already wrote you would need the gd library or libpng library to open and read a png file. It should be not that hard to get then an array and tell PLplot about that according to what was done in example 20. I've never done that before and also no time to help you here any further.

        Good luck,
        Werner

         
  • Jay Overstreet

    Jay Overstreet - 2011-12-29

    Hi,

    I'm opening this question again.  I'm using libpng to try and plot a png file instead of the pgm used in example 20.  The problem I'm having is that I'm not sure how to take an RGBA matrix(four 2D-uints martrices) and convert it to a single 2D PLFLT matrix to plot using PLplot.

    Any guidance will be most appreciative.

    Thanks,

    J.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks