How to extend eimp
grizzly-monkey opened this issue · 5 comments
@zinid
I was trying to extend eimp to scale (resize) and crop for this i found
gdImageScale
gdImageCrop
gdImageCropAuto functions
https://libgd.github.io/manuals/2.2.4/files/gd_interpolation-c.html#gdImageScale
https://libgd.github.io/manuals/2.2.5/files/gd_crop-c.html#Cropping
However i see in eimp.c
main () calls loop (void) and it calls only convert()
How do extend / change so that i can also add other gd function support.
did not quite understand
if (buf) {
if (read_buf(buf, size) == size) {
pid_size = buf[0];
if (size >= pid_size + 3) {
result = convert(buf, buf[pid_size + 1], buf[pid_size + 2],
buf+pid_size+3, size-pid_size-3);
}
}
}
Wait a bit, I will add new command (identify
) and will improve this C crap 😄
Cool thanks @zinid
I've just added identify/1
function (see README).
I also added description of the data format accepted by the port (see c_src/eimp.c comments).
Let me know if you have further questions.
Great ... @zinid thanks ..
Will try to extend this to other functions Thanks for quick turnaround.