Change JPG quality in a shell

Yeah, so I’m post­ing the dregs of what I’m learn­ing for another project here. Deal with it! I was rather proud of this lit­tle gem, not because it’s amaz­ingly com­pli­cated, but just because it saves me so much time and band­width (think down­load, process locally using GUI tools, re-upload).

mogrify -geometry 700x525\> -quality 85 -unsharp 1x1 *.JPG

YMMV with the *.JPG bit… obvi­ously will need chang­ing. This whole thing depends on ImageMag­ick being installed… but it will be on most plat­forms (By plat­forms, I mean real oper­at­ing sys­tems where you don’t need a graph­i­cal dis­play to pull these things off! *puts on seedy hard­core chain smok­ing Unix geek voice* “I do type­set­ting and print design from the con­sole, man.”), I’d imagine.

# by Josh on September 25th, 2005 Tags: , , ,
| No Comments »

A snippet of thought regarding a problem.

Scan­ning is dealt with. Finis. Prob­lem resolved, utterly. Cross-platform hap­pi­ness — remote access, even! Print­ing like­wise. What’s left? The biggest issue of all… pos­si­bly. Depends on what pretty GUI tools and the like exist, I sup­pose… learn­ing new sys­tems in small time­frames is never really fun, but the learn­ing curve shouldn’t be too dan­ger­ous. A few thou­sand dol­lar dan­ger­ous. Paper­weight dan­ger­ous. Hardly! The paper­weight wouldn’t be heavy enough to hold down paper! Ah, bread­box com­put­ing.

If this post makes no sense what­so­ever to you, good. That was my inten­tion. It’d be no fun let­ting the cat out of the bag before I had lots of cute pic­tures of the cat to show you all… so there’s a wait, until I get all this up and run­ning, then I can start my geek boast­ing. No, this post is mostly about links. Smart cook­ies will likely have a mod­er­ately good idea what’s cook­ing, if they think about it, but the project should still hold a degree of excite­ment (hey, I know exactly what’s going on, I’m as excited as any­one!). In the (at this point) highly unlikely event that the whole con­cept falls apart hor­ren­dously, that will like­wise be com­mu­ni­cated in the full­ness of time, along with the orig­i­nal intended idea and pro­posed course of action. Hav­ing said that, I plan to spend at least part of tomor­row morn­ing organ­is­ing hardware…

SuSE and Apache weirdness…

I’m in one of those really frus­trated geek moods, so if you don’t understand/enjoy these rants, skip read­ing this post.

ARGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHH!!!qvaorentfq34iogfaenrgnoaerg~!!!!!

WHY CAN’T SUSE JUST BE NORMAL?! I mean, I know it’s Ger­man and all that, but still!  HISSSSSSSS!!!!  You know what?  Tech­ni­cally, the way it’s setup the whole Apache con­fig­u­ra­tion thing is prob­a­bly FAR bet­ter than any­thing else I’ve ever seen!  No, more than that… it IS bet­ter setup.  It is struc­tured VERY nicely, and, despite the lack of YaST con­fig­u­ra­tion options (who needs GUI’s any­way?), very easy to use.  Except for some bloody impos­si­ble issue it seems to have with access­ing files!

So, set­ting up a vir­tu­al­host has never been so sim­ple and quick and… yeah, just gen­er­ally nice.  Admit­tedly, I think it still needs a restart, but hey, what’s new?

All is good.  Until, of course, you try and point the Doc­u­men­t­Root to some­where vaguely use­ful.  In my case, some­where inside my home user direc­tory (/home/josh) — I have a devel­op­ment folder setup, which I pre­vi­ously had an IP-based vhost setup to point to for all local devel­op­ment and test­ing (/home/josh/MyDocs/webdevelopment — /home/josh/public_html also sym­links there).  This is where it all starts to become some­what flaky.

By default (yeah, who­ever built the RPM was a bit of an odd one…), mod_userdir is ENABLED… not for vhost­ing or any­thing spe­cial, just acces­si­ble via http://servername/~*/ — and that will point to /home/*/public_html where * is the user­name.  Okay.  So, I’ve gen­er­ally got about three accounts setup on my desk­top.  Root, which is never logged into (although su’d into often enough that per­haps I should actu­ally login prop­erly…), my user account, for every­thing under the sun, the home direc­tory of which resides on a sep­a­rate phys­i­cal vol­ume (40GB ext3), and a (pass­word­less) guest account for use of mis­cel­la­neous oth­ers.  No, I’m not too wor­ried about leet hax0rs read­ing this and com­pro­mis­ing my b0xen… sit­ting com­fort­ably behind another IP fil­ter­ing bun­dle of joy, and I’m not too scared of the other machines on my own net­work, at least, not most days of the week.

So.  The guest user works inter­est­ingly.  /home/guest/public_html cor­re­sponds to http://localhost/~guest/, which suc­cess­fully pro­duces a direc­tory list­ing (albeit one with­out any actual files — the direc­tory is cur­rently empty).  Try the same with MY account, and all I get is a schnazzy 403 for­bid­den page.

That is, of course, when I have the sym­link to my devel­op­ment folder there.  Were I to sim­ply have a folder there, all works per­fectly.  So why don’t I just be a big boy, get over it, and move the devel­op­ment folder?  Hmm.  Well, there’s about 1.5GB of data in there (1,585,358,110 bytes, to be exact), and cer­tain edit­ing appli­ca­tions would prob­a­bly try to hang me out on a tree if I just moved it with­out inform­ing them.  And I could inform them, but it’d take time.

Oh, yeah, and it’s like admit­ting defeat.  Yeah, it’s a com­puter, but I can be more stub­born, so there!

Hmm.  So it’s look­ing like it has some kind of ran­dom oppo­si­tion to sym­links, as of right now… but that shouldn’t be a prob­lem!  Grrrr!

Per­son­ally, I’m sus­pi­cious of all this wizard-driven crap SuSE is try­ing to pull… there is an extent to which I’d like to be able to do things for myself, with­out hav­ing to give the prover­bial fin­ger to a bunch of auto­mated mech­a­nisms which attempt to do it for me and fail mis­er­ably.  Case in point, the YaST printer setup tool and ptal/hpoj configuration.

Hmm.  If any­one has any ideas, feel free to throw them this way… I know what the REAL solu­tion is, but I don’t par­tic­u­larly want to setup another com­puter just for the pur­pose of web-serving, because that would involve buy­ing another hard-drive with money I don’t have.

</rant>