The topic of html templating seems to be trending. I'm always looking to increase what I can do with templates, and an important part of that for my needs is manipulating images. I want to be able to use perl for things that I might otherwise use a command line for, if nothing else than to spare the keystrokes as per the virtue of laziness. But it's essential for me not to have images that are 2 megs instead of 100 k, where most images do fine.

The first problem? I'm on a new machine, and every time I install ImageMagick, I feel like I'm getting hazed. What I think needs to happen is that perl has to be able to find the dev libraries, and somehow, what I have isn't doing that yet. According to my ubuntu 14.04 OS, I have this installed. Yet I can't get past the initial use. I took a couple screenshots and put them up on a page, which I created by commenting out the use statement: screenshots.

$ perl magick1.pl Can't locate Image/Magick.pm in @INC (you may need to install the Imag +e::Magick module) (@INC contains: template_stuff /etc/perl /usr/local +/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/sha +re/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_ +perl .) at magick1.pl line 15. BEGIN failed--compilation aborted at magick1.pl line 15. $

I don't want to get too ambitious for how much to get done on one thread, but after it's installed, I'd like to use perl to get all images in a directory shrunk to less than 100 k. Thanks for your comment.


In reply to Using ImageMagick effectively by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.