Set - An observation

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
miket
Posts: 60
Joined: 2016-08-12T13:19:13-07:00
Authentication code: 1151

Set - An observation

Post by miket » 2016-10-06T06:27:26-07:00

I'm new to perl magic and am writing this post to highlight a "feature" which took me some time to resolve, in the hope that it might save others a bit of time in the future :)

Running (for example):

$image->Set(Alpha=>'Set');

does what it says on the tin !

For those of us with thick fingers, running:

$image->Set(Alphs=>'Set');

also runs (at least on my system), but creates an "Alphs" tag within the $image file with the value of 'Set'. This appears to happen silently (i.e. no warnings or errors).

The erroneous "Alphs" tag can be found using $image->Identify(); under Properties.

Whilst the ability to embed you own custom tags is certainly handy, it's a bit of a pain when it comes to troubleshooting!

I've not checked to see if there is the facility within perl magic to trap this error (I'm a bit lazy when it comes to error trapping in my scripts).

Hopefully this will save somebody some time at some time.

Mike

Post Reply