Modul for useing ImageMagick options

Constantinff

Joined: 2009-07-16
Posts: 7
Posted: Fri, 2009-07-17 20:41

I have installed ImageMagick on the server, and need a modul or something else that will be able to modify pictures in the gallery. For example to put a frame on all of the pictures, or just to use all the available options of the ImageMagick
Thanks

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 11013
Posted: Fri, 2009-07-17 20:56

I've already told you such a module does NOT exist. You'll need to create it. G2 is not being worked on and the devs are working on G3 so if you need guidance in making a module for G2, use existing modules for examples, and read the documentation

http://gallery.menalto.com/dev
http://codex.gallery2.org/

And you can try asking for help in the Module Development forum: http://gallery.menalto.com/forum/71 but you'll likely not get much there unless there's someone else out there with knowledge and time. I'm not a developer and couldn't give you any more guidance than what I've already done.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
Constantinff

Joined: 2009-07-16
Posts: 7
Posted: Fri, 2009-07-17 21:09

Then is there something similar already done, just need the closest think that can be modified.
And if someone code php, can you help me edit image, the code I think is in DownloadItem.inc:

Quote:
$phpVm->header('Content-type: ' . $data['mimeType']);
$phpVm->header('Content-Disposition: inline; filename="' . $data['pseudoFileName'] . '"');
$stats = $platform->stat($data['derivativePath']);
$phpVm->header('Last-Modified: ' . GalleryUtilities::getHttpDate($stats[9]));
$phpVm->header('Expires: ' . GalleryUtilities::getHttpDate(2147483647));
$phpVm->header('Cache-Control: private');

/* If the request method is HEAD, don't send back the body */
if ($requestMethod == 'head') {
$phpVm->header('Content-length: 0');
} else {
if ($stats[7] > 0) {
$phpVm->header('Content-length: ' . $stats[7]);
}
/*
* Don't use readfile() because it buffers the entire file in memory. Profiling shows
* that this approach is as efficient as fpassthru() but we get to call
* guaranteeTimeLimit which prevents it from failing on very large files
*/
if ($fd = $platform->fopen($data['derivativePath'], 'rb')) {
while (true) {
$bits = $platform->fread($fd, 65535);
if (strlen($bits) == 0) {
break;
}
print $bits;
$gallery->guaranteeTimeLimit(30);
}
$platform->fclose($fd);
}
}

return null;
}

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 11013
Posted: Fri, 2009-07-17 21:34

Not that I know of. AFAIK, nobody has made any modules to do any sort of advanced image editing, work was started by someone, but that project died a long time ago. You haven't even explained what you are trying to do other than "edit photos"
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments