On Thu, Mar 13, 2008 at 10:54 AM, Doug Hunt <[EMAIL PROTECTED]> wrote:
> Hi Hezekiah:  I'm not sure what 'truecolor' is, but the 'mem' and
>  'memcairo' drivers (which I'm fiddling with right now) are designed to
>  allow one to make a plot on an image background.

By "truecolor," I meant a photograph or similar image (MODIS visible
wavelength images in my case) plotted in the same colors perceived by
a human eye.  The currently available plimage* functions plot colors
based on the magnitude or intensity of values.

The mem and memcairo drivers were my first thought for this.  However,
I think it would be useful to have an RGBA image plotting function
included in PLplot for the following reasons:
  - It would be simpler to, for example, use the same coordinate
transformations in each portion of a plot.  This would include
consistent pixel -> plot coordinate mapping and 3D orientation of
images for 3D plots.
  - Images could be used as layers other than the background, without
needing to do post-processing of the PLplot output
  - The available PLplot output devices are available for "free."
  - I may be wrong about this, but I think it would make the process
of using such images easier for users of PLplot in languages other
than C.

>  You pass in an RGB array as the background, and make normal PLplot
>  function calls.  The lines, points, labels, etc generated by PLplot
>  overlay the image, which is passed back to the user as an RGB array.
>  Then you need to write the RGB array to some image format using external
>  software.
>
>  Currently the decorations are opaque, but I'm looking into allowing
>  semi-transparent overlays on the input image (using the cairo alpha
>  channel support in memcairo) right now.

Is there documentation available for the this use of the memcairo
driver?  If I am unable to implement a function to do what I want then
this would still do a lot of what I need.

Thank you for the response!

Hez

>  Regards,
>
>    Doug
>  On Wed, 12 Mar 2008, Hezekiah M. Carty wrote:
>
>  > Are there currently plans to add either of truecolor image support
>  > (photo as a plot background for example) or 3D oriented plimagefr
>  > support?  If not, and there is an interest in including such functions
>  > in plplot, I would like to tackle those after getting the plimagefr
>  > coordinate transformation support finalized.
>  >
>  > For the truecolor image support, my thought is to have a function
>  > along the lines of:
>  > void plimagergba(
>  >  PLFLT** r, PLFLT** g, PLFLT** b, PLFLT** a,
>  >  PLINT xdim, PLINT ydim,
>  >  PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax,
>  >  void (*pltr) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer 
> pltr_data)
>  > with function arguments being used similarly to how plimage works.
>  > With the r,g,b,a values separate, any image loading routines could be
>  > handles on the user's end or at least abstracted on top of this.
>  >
>  > Is there a function like plfill (and/or plfill3) which can take a RGBA
>  > color to plot?  The plimage* functions use plfill internally.  Or is
>  > there a better, more plplot-like way to go about this?
>  >
>  > Thanks,
>  > Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to