so about image processing. sure I know that tgere is gxml but I dont have any samples or documentation how to edit some image and show it to user in web browser
there is some stuff I done by my self. this is maximum I can figure out in attachments you can see what I have done and there it is on web http://katalogs.core.lv/demo
peace of script. this section will build thumbnails from images in selected folder (on the web page you can see)
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(); }
so there I made decode and encode jpg image and image resizing
so I wan to add there more image pike options like sharpen blur colorize lighten darken and more (or also draw some ither image transparent gif as logo ) of course these options will be seperated by if conditions
it would give ability to proccess images on the fly and add some effects
on the web site you can see some samples I have done with cimg and gtext but I dont like this pike is faster and more options more
actualy I wan to create a web site where users can pick some image put some nice text on it some masks effects borders . in one word . add on image some stilistic stuff and in result will get very nice personalised postcard
.. also it is important for web site creation dinamicaly draw texts effects and more on images
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
so about image processing. sure I know that tgere is gxml but I dont have any samples or documentation how to edit some image and show it to user in web browser
there is some stuff I done by my self. this is maximum I can figure out in attachments you can see what I have done and there it is on web http://katalogs.core.lv/demo
peace of script. this section will build thumbnails from images in selected folder (on the web page you can see)
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(); }
so there I made decode and encode jpg image and image resizing
so I wan to add there more image pike options like sharpen blur colorize lighten darken and more (or also draw some ither image transparent gif as logo ) of course these options will be seperated by if conditions
it would give ability to proccess images on the fly and add some effects
on the web site you can see some samples I have done with cimg and gtext but I dont like this pike is faster and more options more
actualy I wan to create a web site where users can pick some image put some nice text on it some masks effects borders . in one word . add on image some stilistic stuff and in result will get very nice personalised postcard
.. also it is important for web site creation dinamicaly draw texts effects and more on images
/ Brevbäraren
pike-devel@lists.lysator.liu.se