Image::Magick::Thumbnail::create problem

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Image::Magick::Thumbnail::create problem


    I am using a script based on the example from [url]www.cpan.org[/url] for
    Image::Magick::Thumbnail:-
    #!/usr/bin/perl -w
    use CGI qw(:all);

    print header;
    use Image::Magick;
    use Image::Magick::Thumbnail;
    my $input_file="source.jpg";
    my $thumbnail_name="source_tn.jpg";
    my $thumbnail_size=50;

    my $src = new Image::Magick;
    $src-Read($input_file);#read the original image


    # Create the thumbnail from it, where the biggest side is
    $thumbnail_size px
    my ($thumb,$x,$y) =
    Image::Magick::Thumbnail::create($src,$thumbnail_s ize);

    $thumb-Write($thumbnail_name);# Save the thumbnail in the current
    directory

    I am getting the following error:-
    Use of uninitialized value in numeric gt () at
    C:/Perl/site/lib/Image/Magick/Thumbnail.pm line 48.

    This error happens in
    Image::Magick::Thumbnail::create($src,$thumbnail_s ize);
    I'm running this on Windows 98.

    Can anyone help me with this one?

    Thanks

    Paul


    --
    wapboy
    wapboy Guest

  2. Similar Questions and Discussions

    1. Image Magick thumbnail batch resizing
      Spartacus <spam@mailinator.com> writes: I think you want to scale instead of sample do convert -quality 85 -scale x75 $i ../thumbs/`basename $i...
    2. Help: Image::Magick::Thumbnail
      Hi, The following example (from cpan.org) take an .jpg image and creates a thumbnail. It creates an image where the biggest size is 50 pixels. ...
    3. Thumbnail image in Flash to larger image in new window?
      I have a series of thumbnail images in Flash and I want the user to be able to click on the thumbnail and get a larger photo. I know how to make the...
    4. Image::Magick Read Problem
      Hi, I have created a perl cgi script which allows the user to upload image files to the server. Once the files have been stored on the server,...
    5. unicode in Image::Magick (hex values and braces problem?)
      Eric Schwartz <emschwar@pobox.com> wrote in comp.lang.perl.misc: To mimic the OP's code perfectly it should only use every other character. Note...
  3. #2

    Default Re: Image::Magick::Thumbnail::create problem

    In article <wapboy.1cyubn@news.webfrustration.com>,
    wapboy <wapboy.1cyubn@news.webfrustration.com> wrote:
    >
    >I am using a script based on the example from [url]www.cpan.org[/url] for
    >Image::Magick::Thumbnail:-
    >#!/usr/bin/perl -w
    >use CGI qw(:all);
    >
    >print header;
    >use Image::Magick;
    >use Image::Magick::Thumbnail;
    >my $input_file="source.jpg";
    >my $thumbnail_name="source_tn.jpg";
    >my $thumbnail_size=50;
    >
    >my $src = new Image::Magick;
    >$src-Read($input_file);#read the original image
    >
    >
    ># Create the thumbnail from it, where the biggest side is
    >$thumbnail_size px
    >my ($thumb,$x,$y) =
    >Image::Magick::Thumbnail::create($src,$thumbnail_ size);
    >
    >$thumb-Write($thumbnail_name);# Save the thumbnail in the current
    >directory
    >
    >I am getting the following error:-
    >Use of uninitialized value in numeric gt () at
    >C:/Perl/site/lib/Image/Magick/Thumbnail.pm line 48.
    >
    >This error happens in
    >Image::Magick::Thumbnail::create($src,$thumbnail_ size);
    >I'm running this on Windows 98.
    >
    What's the version of your Image::Magick module, and what version
    of ImageMagick are you using?

    --
    -john

    February 28 1997: Last day libraries could order catalogue cards
    from the Library of Congress.
    John M. Gamble Guest

  4. #3

    Default Image::Magick::Thumbnail::create problem


    John M. Gamble Wrote:
    > What's the version of your Image::Magick module, and what version
    > of ImageMagick are you using?
    >
    >
    I downloaded these modules sometime ago and I'm not certain how I tell
    the version, but it looks like it is:-
    Image::Magick 5,46,0,0
    Image::Magick::Thumbnail 0.01

    Thanks

    Paul


    --
    wapboy
    wapboy Guest

  5. #4

    Default Re: Image::Magick::Thumbnail::create problem

    In article <wapboy.1d4ebm@news.webfrustration.com>,
    wapboy <wapboy.1d4ebm@news.webfrustration.com> wrote:
    >
    >John M. Gamble Wrote:
    >> What's the version of your Image::Magick module, and what version
    >> of ImageMagick are you using?
    >>
    >>
    >
    >I downloaded these modules sometime ago and I'm not certain how I tell
    >the version, but it looks like it is:-
    >Image::Magick 5,46,0,0
    >Image::Magick::Thumbnail 0.01
    >
    >Thanks
    >
    >Paul
    >
    Hmph. You're more advanced than me.

    I'm afraid that I don't see anything obvious at the moment.

    --
    -john

    February 28 1997: Last day libraries could order catalogue cards
    from the Library of Congress.
    John M. Gamble Guest

  6. #5

    Default Re: Image::Magick::Thumbnail::create problem

    In article <wapboy.1cyubn@news.webfrustration.com>,
    wapboy <wapboy.1cyubn@news.webfrustration.com> wrote:
    >
    >I am using a script based on the example from [url]www.cpan.org[/url] for
    >Image::Magick::Thumbnail:-
    >#!/usr/bin/perl -w
    >use CGI qw(:all);
    >
    >print header;
    >use Image::Magick;
    >use Image::Magick::Thumbnail;
    >my $input_file="source.jpg";
    >my $thumbnail_name="source_tn.jpg";
    >my $thumbnail_size=50;
    >
    >my $src = new Image::Magick;
    >$src-Read($input_file);#read the original image
    Wait a minute. Is this copied directly from your script? If
    so, what's this "$src-Read(..." line doing there? Likewise
    the "$thumb-Write(..." line below.

    Is this a side-effect of your cut-and-paste, or is it actually
    written that way in your code?
    >
    >
    ># Create the thumbnail from it, where the biggest side is
    >$thumbnail_size px
    >my ($thumb,$x,$y) =
    >Image::Magick::Thumbnail::create($src,$thumbnail_ size);
    >
    >$thumb-Write($thumbnail_name);# Save the thumbnail in the current
    >directory
    >
    >I am getting the following error:-
    >Use of uninitialized value in numeric gt () at
    >C:/Perl/site/lib/Image/Magick/Thumbnail.pm line 48.
    >
    >This error happens in
    >Image::Magick::Thumbnail::create($src,$thumbnail_ size);
    >I'm running this on Windows 98.
    >
    >Can anyone help me with this one?
    >
    >Thanks
    >
    >Paul
    >
    >
    >--
    >wapboy

    --
    -john

    February 28 1997: Last day libraries could order catalogue cards
    from the Library of Congress.
    John M. Gamble Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139