Just wanted to post an update to my rant yesterday about getting cursors working, etc. I was up until 2 in the morning last night, wracking my brains about how to get a simple drop-shadow to work in perlmagick (ImageMagick-perl interface). Very grumpy this morning as a result and feeling in general rather bad. And the worst of it was that I couldn’t figure it out. ImageMagick is probably the most confusing and simultaneously powerful interface that I’ve yet come across. Anyway, at the end of it, instead of trying to get the perl modules to do what I wanted it to, I’ve cheated and used a system() call from the perl script to get the job done. And it works nicely.
In case you tuned in late, there is a nifty little perl script called sd2xc.pl that converts StarDock/CursorXP neato animated cursors into cursors that X and Linux and UNIX and *BSD, etc., can use. Well, this has all worked wonderfully until a recent upgrade to ImageMagick which broke the image compositing and alpha-channel stuff.
So, without further ado, I give you my ugly hack around the ImageMagick API changes:
system(“convert -page +$shadowx+$shadowy $outfile \( +clone -background black -shadow 80×4+$shadowx+$shadowy \) +swap -background none -flatten -crop +$shadowx+$shadowy $shadowfile”);
in straight perlmagick, then PLEASE tell me how, as it would be much more efficient to do it that way.
I’m still grousing about all the hoops and dance moves one has to do to get things like this working in Linux/X/UNIX, but at least I have some new pretty cursors to keep me distracted for a month or so.
Again, I repeat, IF ANYONE KNOWS HOW TO DO THIS BETTER, PLEASE TELL ME.
=:)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Recent Comments