Scarpening: ... OurImage = Image.JPEG.decode(buff); OurImage = OurImage-> apply_matrix( ({({-1,-1,-1}), ({-1, 12,-1}), ({-1,-1,-1})}) ); ...
This is not the right forum for these kind of questions. Here we discuss how to extend Pike, not how to use it. Isn't there still a Pike user-list at pike@roxen.com? It says so on http://pike.ida.liu.se/forums/ anyway.
/ Hedda (Halvt frånvarande)
Previous text:
2002-09-30 15:38: Subject: Re: can anybody help me
yes I know there is much
but as Im not proffesianla in pike coding can you help me and show little example not exacly example just how to use some option here
in this script whee I need to put option for sharpening and so on
please dont be ungry.. :) ok ...
buff = Stdio.read_bytes("/box1/demo/"+id->variables->cat+"/"+id->variables->img); if (buff != 0 ) {
object OurImage; OurImage = Image.JPEG.decode(buff); float xsize = (float) OurImage->xsize(); float ysize = (float) OurImage->ysize();
float scale = 1.0; if (xsize > ysize) scale = ((float) 90)/xsize; else scale = ((float) 70)/ysize; OurImage = OurImage->scale(scale); reply = Image.JPEG.encode(OurImage);
array dir = get_dir("/box1/boss/demothumbs/"+id->variables->cat+"/"); if (arrayp(dir)==0) { mkdir("/box1/boss/demothumbs/"+id->variables->cat+"/"); } open_res = me->open("/box1/boss/demothumbs/"+id->variables->cat+"/" + id->variables->img,"cw"); if (open_res == 1) me->write(reply); me->close(); } else { open_res = me->open("/box2/fotodata/default/not_found.gif","r"); reply = me->read(); me->close(); }
----- Original Message ----- From: "Hedda (Halvt frXnvarande) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se To: pike-devel@lists.lysator.liu.se Sent: Monday, September 30, 2002 4:15 PM Subject: Fw: can anybody help me
Isn't
http://pike.ida.liu.se/generated/manual/modref/ex/Image/Image.html
enough? There are examples in almost every method there.
/ Hedda (Halvt frånvarande)
Previous text:
2002-09-30 14:39: Subject: Fw: can anybody help me
/ Brevbäraren
pike-devel@lists.lysator.liu.se