• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/perl
2#  Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization
3#  dedicated to making software imaging solutions freely available.
4#
5#  You may not use this file except in compliance with the License.  You may
6#  obtain a copy of the License at
7#
8#    http://www.imagemagick.org/script/license.php
9#
10#  Unless required by applicable law or agreed to in writing, software
11#  distributed under the License is distributed on an "AS IS" BASIS,
12#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#  See the License for the specific language governing permissions and
14#  limitations under the License.
15#
16# Test image blobs.
17#
18BEGIN { $| = 1; $test=1, print "1..1\n"; }
19END {print "not ok 1\n" unless $loaded;}
20use Image::Magick;
21$loaded=1;
22
23chdir 't' || die 'Cd failed';
24
25$image = new Image::Magick;
26$image->Read( 'input.miff' );
27@blob = $image->ImageToBlob();
28undef $image;
29
30$image=Image::Magick->new( magick=>'MIFF' );
31$image->BlobToImage( @blob );
32
33if ($image->Get('signature') ne
34    'f7b3db46d6f696ea8392f0ad0be945dd502a806e2c1e9c082efef517191758f7')
35  { print "not ok $test\n"; }
36else
37  { print "ok $test\n"; }
38
391;
40