Skrevet av Emne: Perl, Image::Magick::Write and eval() don't go along under mod_perl  (Lest 4250 ganger)

ATC

  • Gjest
  • [applaud]0
  • [smite]0
  • An Image::Magick object created inside an eval() block works fine, but later using the Write() method outside the eval() only works outside of mod_perl. When used in a mod_perl environment it yields NULL.



    ATC

    • Gjest
    [Solved] Perl, Image::Magick::Write and eval() don't go along under mod_perl
    « Svar #1 på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • We have not yet succeeded in figuring out WHY this happens, but use the ImageToBlob() workaround instead of Write()

    So, instead of

    $canvas->Write(filename=>"-");

    use

    my $blob = $canvas->ImageToBlob();
    print STDOUT $blob;