(none) imager-devel
/ help / lists / applications / search /
 

Re: Pasting problems; charting modules ?

From:
17640@xyz.molar.is
Date: Mon 24 Dec 2007 - 23:04:47 GMT

  • Next message: Dean Arnold: "Re: Pasting problems; charting modules ?"

    On Mon, Dec 24, 2007 at 12:06:13PM -0800, Dean Arnold wrote:
    > Some issues I'm having (using Imager 0.60 from the ppd on Win32):
    >
    > 1. If I paste a 3 channel PNG image into a 4 channel image,
    > the result is not properly rendered (sometimes not rendered at all).
    > I'm trying to port GD::Tiler to Imager::Tiler, and need to be able
    > to mix 3 and 4 channel images. I'm also trying to port DBD::Chart to Imager,
    > and will need the 3 => 4 channel paste for it as well.

    This is a known problem, as ticket

    https://rt.cpan.org/Ticket/Display.html?id=30908

    I'm planning on fixing this for 0.63.

    As a workaround you can adapt the source image to match the channels
    of the target with the convert() method:

      $src = $src->convert(preset => 'addalpha');

    > 2. If I paste a 4 channel image w/ transparent pixels into a
    > 4 channel image with existing content (e.g., a filled box() for
    > a background color), the pasted image's transparent pixels overwrite
    > the existing content, i.e., the resulting image has transparent pixels,
    > rather than the prior image contents. Is there an option to do a blended
    > paste ?
    >
    > Are these known issues, or should I open tickets in rt.cpan.org ?

    The rubthrough() method does alpha blending of the source image with
    the target.

    Unfortunately if the source image for rubthrough() has no alpha
    channel it will error rather than doing the obvious thing. This is
    issue https://rt.cpan.org/Ticket/Display.html?id=29944

    I'm planning on fixing this in 0.63 too.

    > 3. What are the existing charting modules for Imager ? I've thus far
    > found Imager::Plot, Imager::Graph, and Imager::Chart::Radial.
    > What does Imager::Plot support, just linegraphs ?
    > lines and scatter graphs ? The docs seem silent on the subject.

    That looks like the complete list.

    From looking at the source Imager::Plot supports line, scatter and
    area charts. It's effectively unmaintained, Arnar made me
    co-maintainer of Imager::Plot when he made me Imager co-maintainer,
    but I haven't done anything with it.

    Imager::Graph I want to do more with, but I haven't made an recent
    progress except for some recent cleanup releases.

    > I've got current implementations of line, scatter, and area graphs,
    > boxcharts, pie charts, barcharts, quadtrees/treemaps, and a simple Gantt
    > chart in DBD::Chart::Plot which I'm porting over to Imager from GD,
    > and I'm adding bubble charts and bulletcharts, and maybe gauges.
    > (see www.presicient.com/dbdchart and www.presicient.com/dbixchart for info)
    > It might be nice to merge these efforts into a single package (the
    > rendering engines, not the SQL interface).

    There's an existing "common" image manipulation module - Image::Mate,
    but it's very incomplete.

    > 4. Is there any plan to create a new PPD for version 0.62 soon ?

    I'd like to update some of the libraries I use in the build before I
    release a 0.62 PPD.

    Tony



  •