in reply to Re: How to create images with 300dpi?
in thread How to create images with 300dpi?

Thanks, but I have tried this already and didn't work. I should have given more info- I am using Venn::Chart for creating Venn diagrams. This module uses GD to draw the charts.

#!/usr/bin/perl use warnings; use Carp; use strict; use Venn::Chart; (A) # Create the Venn::Chart constructor my $venn_chart = Venn::Chart->new( 500, 500 ) or die("error : $!"); + (B) my $venn_chart = Venn::Chart->new( 500, 500,1 ) or die("error : $! +");

I have tried both ways- A and B. Could it be that Venn::Chart is using default 8-bit image settings while calling GD? Diving into Chart.pm shows up --

sub new { my ( $self, $width, $height ) = @_; $self = ref($self) || $self; my $this = {}; bless $this, $self; ----- ----- }

This tells me that it is taking only width, height as parameters. There are other options also but I am not sure which one to play with as I am not into OOP. Looks like it is time I learn object orientation too.

Replies are listed 'Best First'.
Re^3: How to create images with 300dpi?
by BrowserUk (Patriarch) on May 26, 2012 at 12:06 UTC

    The problem here is not with GD, but that Venn::Chart is designed to only produce 8-bit images. It would require careful modification to change that.

    Personally, I would write my own subroutine to generate a Venn Diagram. Drawing 2 or 3 overlapping circles is not difficult.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Thanks a lot again, I was also coming to the same conclusion after finding that Venn::Chart used only mode A for defining height & width but no option for truecolor. This was a problem I had resigned to without even knowing the reason, but BrowserUK has shown the way and helped me figure this out so easily. I will definitely try churning out my own code :)