Hi, Activestate 5.8 and IM 6.2.4
This feels like a silly question to have to ask but I don't understand. I was trying to do something with perl magick and read in the documentation that I need to use a syntax like: name=>string, profile=>blob My problem is that I have never used a blob before, there is nothing in the llama book, perlopentut or the cookbook and the only information I can find related to databases. I think in this case the blob is meant to be the contents of a binary file (ICC profile). To create a blob do I open the file using the normal open(FH,$myfile) command? Once it opens is there something else I need to do...like slurp up <FH>? Is there something else I need to do to make it a blob (binmode)? Thanx. Dp. ========== What I've tried so far ============ use Image::Magick; use strict; use warnings; use File::Basename; my $in = 0; my $profile = "c:\\test\\AdobeRGB1998.icc"; my $path = "c:\\test\\"; chdir("$path") or die "Can't CD into $path: $!\n"; print "$path\n"; my @jpegs = glob("${path}*.jpg"); my ($image,$x); foreach my $j (@jpegs) { ++$in; print "$in\) $j\n"; my $base = basename($j); $image = Image::Magick->new; $x = $image->Read("$j"); warn $x if $x; $x = $image->Strip; warn "$x" if "$x"; open(PROFILE, "<$profile") or die "Can't open $profile: $!\n"; binmode PROFILE; # my $fh = <PROFILE>; $x = $image->Profile(name=> "ICC", profile=>\*PROFILE, ); (my $n) = ($j =~ /(.*)\.JPG$/i); my $newname = "$n"."-new.jpg"; print "$j -> $newname\n"; $x = $image->Write("$newname"); warn $x if $x; undef($image); close(PROFILE); } ======================================= -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>