Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Re: Image Magick

    Mike At Spy wrote:
    > Anyone here familiar with the installation of Image Magick and what files it
    > installs on your machine?
    >
    > I had an admin put it on, and then took it off - but took it off by removing
    > what she thought were all of the files related to it. I just found some
    > files I think that are. They are located in the usr/local/bin directory and
    > are called:
    >
    > animate
    > composite
    > convert
    > display
    > identify
    > mogrify
    > montage
    >
    > The date/time of the files being put there seems to correspond with when the
    > admin put the program on, and names of the files seem to imply it to me.
    >
    > And I just wanted to make sure I'm not going to screw up something else by
    > removing them. :)
    >
    > Thanks!
    the easiest way to remove them is to use RPM, if that was what was used
    to install them
    rpm -e ImageMagick

    if there are no dependency problems, then it will go ahead.

    make sure that you don't have any libraries that use it! I use
    ImageMagick in a PHP image-upload function that resizes to a maximum
    size. The RPM program would not tell you of that dependency.

    Kae
    Kae Verens Guest

  2. Similar Questions and Discussions

    1. Image::Magick newbie
      Hi, Hopefully, this will be easy for someone else: perl Makefile.PL LIB=xx PREFIX=xx went off okay. but.. Magick.xs was throwing up a lot...
    2. Image::Magick and padding of image
      I need to pad an image with a white border to make it fit a certain size. So far I've found the Border() method to do the job, but not quite. As...
    3. can't install Image::Magick
      I need help to install Image:Magick. I've done all I can and searched the web, but now I'm really stuck. My problem seems to be FreeType or...
    4. Image::Magick and Tk::Photo
      I am trying to read in a bunch of images and manipulate them using Image::Magick, then display them using Tk::Photo. I would like to do this...
    5. [PHP] Image Magick
      Mike -- ...and then Mike At Spy said... % % Anyone here familiar with the installation of Image Magick and what filesit % installs on your...
  3. #2

    Default Image Magick

    Hello all,

    I am trying to use Image::Magick to resize a JPEG. This routine works to
    display the full size image from a blob in my Firebird database:

    while ( my ($PixData )
    = $sth->fetchrow ) {
    print header('image/jpeg');
    print $PixData;
    }

    But when I add the Image::Magick stuff:

    while ( my (@PixData) = $sth->fetchrow) {
    my $PixDisp=Image::Magick->new(magick=>'jpg');
    $PixDisp->BlobToImage(@PixData);
    $PixDisp->Resize(geometry=>'160x120');
    print header('image/jpeg');
    print $PixDisp;
    }

    I get this:
    Image::Magick=ARRAY(0x82fdee8)
    instead of an image. Can anyone see my obvious mistake?

    Cheers.

    Scott.

    Scott Taylor Guest

  4. #3

    Default Re: Image Magick


    > Hello all,
    >
    > I am trying to use Image::Magick to resize a JPEG. This routine works to
    > display the full size image from a blob in my Firebird database:
    >
    > while ( my ($PixData )
    > = $sth->fetchrow ) {
    > print header('image/jpeg');
    > print $PixData;
    > }
    >
    > But when I add the Image::Magick stuff:
    >
    > while ( my (@PixData) = $sth->fetchrow) {
    > my $PixDisp=Image::Magick->new(magick=>'jpg');
    > $PixDisp->BlobToImage(@PixData);
    > $PixDisp->Resize(geometry=>'160x120');
    > print header('image/jpeg');
    > print $PixDisp;
    > }
    >
    > I get this:
    > Image::Magick=ARRAY(0x82fdee8)
    > instead of an image. Can anyone see my obvious mistake?
    >
    You are getting this because $PixDisp holds an Image::Magick object
    which can't be stringified as you desire. You need to (it appears) call
    the 'Write' method of the object to have it converted to image data.

    [url]http://www.ImageMagick.org/www/perl.html[/url]

    Check the above for an example of how to print an image to a filehandle,
    in your case you want the default STDOUT....

    HTH,

    [url]http://danconia.org[/url]
    Wiggins D Anconia Guest

  5. #4

    Default Re: Image Magick

    At 10:28 AM 01/09/2004, Wiggins d Anconia wrote:

    > > Hello all,
    > >
    > > I am trying to use Image::Magick to resize a JPEG. This routine works to
    > > display the full size image from a blob in my Firebird database:
    > >
    > > while ( my ($PixData )
    > > = $sth->fetchrow ) {
    > > print header('image/jpeg');
    > > print $PixData;
    > > }
    > >
    > > But when I add the Image::Magick stuff:
    > >
    > > while ( my (@PixData) = $sth->fetchrow) {
    > > my $PixDisp=Image::Magick->new(magick=>'jpg');
    > > $PixDisp->BlobToImage(@PixData);
    > > $PixDisp->Resize(geometry=>'160x120');
    > > print header('image/jpeg');
    > > print $PixDisp;
    > > }
    > >
    > > I get this:
    > > Image::Magick=ARRAY(0x82fdee8)
    > > instead of an image. Can anyone see my obvious mistake?
    > >
    >
    >You are getting this because $PixDisp holds an Image::Magick object
    >which can't be stringified as you desire.
    D'oh! I C
    >You need to (it appears) call the 'Write' method of the object to have it
    >converted to image data.
    OK
    >[url]http://www.ImageMagick.org/www/perl.html[/url]
    >
    >Check the above for an example of how to print an image to a filehandle,
    >in your case you want the default STDOUT....
    I've been all over that page, but I'm still stuck at how to do what I
    want. I don't want Apache writing files, I just want to display the new
    image dynamically. Is that even possible?


    Scott Taylor Guest

  6. #5

    Default Re: Image Magick

    At 11:02 AM 01/09/2004, Scott Taylor wrote:
    >At 10:28 AM 01/09/2004, Wiggins d Anconia wrote:
    >
    >
    >
    >>[url]http://www.ImageMagick.org/www/perl.html[/url]
    >>
    >>Check the above for an example of how to print an image to a filehandle,
    >>in your case you want the default STDOUT....
    >
    >I've been all over that page, but I'm still stuck at how to do what I
    >want. I don't want Apache writing files, I just want to display the new
    >image dynamically. Is that even possible?

    Ah, silly me. Thanks Wiggins.

    while ( my (@PixData) = $sth->fetchrow) {
    my $PixDisp=Image::Magick->new(magick=>'jpg');
    $PixDisp->BlobToImage(@PixData);
    $PixDisp->Resize(geometry=>'160x120');
    print header('image/jpeg');
    binmode STDOUT;
    $PixDisp->Write('jpg:-');


    Scott Taylor 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