| 1 |
#!/usr/bin/perl |
| 2 |
# Copyright 1999 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 |
# https://imagemagick.org/license/ |
| 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 |
# |
| 18 |
BEGIN { $| = 1; $test=1, print "1..1\n"; } |
| 19 |
END {print "not ok 1\n" unless $loaded;} |
| 20 |
use Image::Magick; |
| 21 |
$loaded=1; |
| 22 |
|
| 23 |
chdir 't' || die 'Cd failed'; |
| 24 |
|
| 25 |
$image = new Image::Magick; |
| 26 |
$image->Read( 'input.miff' ); |
| 27 |
@blob = $image->ImageToBlob(); |
| 28 |
undef $image; |
| 29 |
|
| 30 |
$image=Image::Magick->new( magick=>'MIFF' ); |
| 31 |
$image->BlobToImage( @blob ); |
| 32 |
|
| 33 |
if ($image->Get('signature') ne |
| 34 |
'fb6fc68beb3b1001c5ebaa671c8ac8fddea06995027127765ff508f77723cc52') |
| 35 |
{ print "not ok $test\n"; } |
| 36 |
else |
| 37 |
{ print "ok $test\n"; } |
| 38 |
|
| 39 |
1; |