Ping API in Perl does not work - 1.3.5

2009-05-26
2013-03-27
  • graphics magick

    graphics magick - 2009-05-26

    I built GraphicsMagick and PerlMagick for Version 1.3.5.  I used the following sequence of commands and the Perl ping operation fails. Can someone correct me if my usage is wrong?

    use Graphics::Magick;
    my $image=Graphics::Magick->new;
    my ($width, $height, $size, $format) =$image->Ping(blob=>$content);   

    The Ping method fails to return the width and the height of the image. They remain as undefined values.

    For the same $content the following command returns the width and the height (this is to confirm the the $content is good)-
    my $x = $image->BlobToImage($content);
    my ($w, $h) = $image->Get('base-columns', 'base-rows');

    Alternatively can someone confirm if this is a defect? Any help is appreciated.

    I found a similar issue with ImageMagick which was resolved in a later release. I was wondering if these were related. The following is an excerpt from the ImageMagick changelog -

    2007-03-11  6.3.3-2 Cristy  <quetzlzacatenango@image...>
      * Read(blob=>$blob) and Ping(blob=>$blob) sometimes failed because the blob length was not being set properly).

     
    • graphics magick

      graphics magick - 2009-05-26

      Yes, ping with file name works fine.

      ($width, $height, $size, $format) = $image->Ping('foo.jpeg');

       
    • Bob Friesenhahn

      Bob Friesenhahn - 2009-05-26

      Ok, I did a bit of testing.  Ping of a disk file works. ImageToBlob() works.  BlobToImage() works.  The syntax $image->Ping(blob=>$blob) does not work since it thinks that 'blob' is the file name.

      It seems that this is a case of documentation getting ahead of actual implementation.

       
    • Bob Friesenhahn

      Bob Friesenhahn - 2009-05-26

      I see that I never implemented a test for Ping so it is probably not working.  Usually I find that if something is not tested, then it probably does not work.

      Does Ping on a file name (i.e. disk file) work for you?

      Bob

       
    • graphics magick

      graphics magick - 2009-05-27

      " It seems that this is a case of documentation getting ahead of actual implementation.  "

      Do you think this feature ($image->Ping(blob=>$blob)) will be supported in the near future?

      Thanks.

       
    • Bob Friesenhahn

      Bob Friesenhahn - 2009-05-27

      Pings on blobs were broken but they are now working in CVS HEAD and will be in the next development snapshot popping out in a few minutes.  Note that the syntax which works is:

      my ($width, $height, $size, $format)=$image->Ping(blob=>@blob);

      Notice the use of array syntax.  The documentation has also been fixed.

       
    • graphics magick

      graphics magick - 2009-05-27

      Tested the latest snapshot and ping blob works fine. Thanks for the quick fix.

      Is there a plan to release version 1.4 anytime soon? If so, where can I find this information.

      Thanks.

       
      • Bob Friesenhahn

        Bob Friesenhahn - 2009-05-27

        My intention is that CVS development sources currently called "1.4" will become the 1.3.6 release.  There is currently no forecast release date but I doubt that it will be more than a month from now.

         
    • graphics magick

      graphics magick - 2009-05-27

      Tested the latest snapshot and ping blob works fine. Thanks for the quick fix.

      Is there a plan to release version 1.4 anytime soon? If so, where can I find this information.

      Thanks.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks