Newly installed, Piwigo 2.9.4
ImageMagick 7.0.8-23 was properly installed after the install of Piwigo.
(GD Library was never installed on this Ubuntu system).
All other image functionality works fine in this Piwigo installation.
Newly installed, Piwigo 2.9.4
ImageMagick 7.0.8-23 was properly installed _after_ the install of Piwigo.
(GD Library was never installed on this Ubuntu system).
All other image functionality works fine in this Piwigo installation.
<!-- github-sync-id:397430040 -->
@plegall why is there that error reporting https://github.com/Piwigo/Piwigo/blob/master/admin/include/photos_add_direct_prepare.inc.php#L176 while there is a check there https://github.com/Piwigo/Piwigo/blob/master/admin/include/photos_add_direct_prepare.inc.php#L36
Is GD library really mandatory? I only remember that GD is used if the pictures are resized after upload
<!-- github-comment-id:452747719 -->
it is to keep metadata when resizing
but to read exif that's just https://github.com/Piwigo/Piwigo/blob/b9336d7117770e304197a3afad1068eea5491a29/include/functions_metadata.inc.php#L141 -> http://php.net/manual/fr/function.exif-read-data.php (btw php 7.2 improved the readibility of exfis data nice!)
<!-- github-comment-id:452775719 -->
I notice that there was once a vulnerability in Imagemagick that would be exploited during the photo_add step - https://www.theregister.co.uk/2016/05/03/imagemagick/
<!-- github-comment-id:453015708 -->
I don't think so. I've made some search on the forum and I said a while back that GD was removing metadata when resizing.
Maybe GD is not really mandatory. What's mandatory is to have either GD or imagemagick. I've always considered GD was coming automatically with PHP. Here is maybe my mistake because today you can perfectly install PHP without GD and have ImageMagick which should be fine.
I'll make some tests without GD and only ImageMagick and if everything works fine, I'll change the condition from "is GD installed" to "is GD or ImageMagick installed".
> it is to keep metadata when resizing
I don't think so. I've made some search on the forum and I said a while back that GD was removing metadata when resizing.
Maybe GD is not really mandatory. What's mandatory is to have either GD or imagemagick. I've always considered GD was coming automatically with PHP. Here is maybe my mistake because today you can perfectly install PHP without GD and have ImageMagick which should be fine.
I'll make some tests without GD and only ImageMagick and if everything works fine, I'll change the condition from "is GD installed" to "is GD or ImageMagick installed".
<!-- github-comment-id:453067082 -->
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
<!-- github-comment-id:454057956 -->
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over
the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
You can force which one to use through the variables in the local config.
Check out website for doc forum etc
Le 14 janv. 2019 17:02, "ronankeane" <notifications@github.com> a écrit :
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over
the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/Piwigo/Piwigo/issues/957#issuecomment-454057956>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAs-jTW1gAP46r7hoSGDEpqyf8mAe76jks5vDKolgaJpZM4Z3vvL>
.
<!-- github-comment-id:454067820 -->
As found by @Teatek in #976 it's possible to use Piwigo without GD, but it will fail for GIF files (animated or not). We need to change some code to adapt ImageMagick command lines to handle static and animated gif files. As said by @mistic100 on https://piwigo.org/forum/viewtopic.php?pid=151293#p151293 and mentioned by Teatek, I agree we would need an option to disable animation on small resized GIF (maybe reusing $conf['derivatives_strip_metadata_threshold'])
As found by @Teatek in #976 it's possible to use Piwigo without GD, but it will fail for GIF files (animated or not). We need to change some code to adapt ImageMagick command lines to handle static and animated gif files. As said by @mistic100 on https://piwigo.org/forum/viewtopic.php?pid=151293#p151293 and mentioned by Teatek, I agree we would need an option to disable animation on small resized GIF (maybe reusing `$conf['derivatives_strip_metadata_threshold']`)
<!-- github-comment-id:462033343 -->
I got around to installing the GD library to make the photos_add page work. A couple of issues.
While the photos_add page now works fine, it displays a message --- Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/photos/piwigo/_data/templates_c/p6jhns^561a9bf60ffeeda8e86a99ad26c0ec6395fd8cf0_0.file.photos_add_direct.tpl.php on line 327
(note my userlist.tpl is updated as per fix https://github.com/Piwigo/Piwigo/issues/887)
I specified $conf['graphics_library'] = 'imagick'; in local config file, but (a) having read your documentation I am unclear as to correct use of 'imagick' or 'ext_imagick', (b) I do not see where I can check and confirm which library is actually being used.
I got around to installing the GD library to make the photos_add page work. A couple of issues.
1. While the photos_add page now works fine, it displays a message --- Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/photos/piwigo/_data/templates_c/p6jhns^561a9bf60ffeeda8e86a99ad26c0ec6395fd8cf0_0.file.photos_add_direct.tpl.php on line 327
(note my userlist.tpl is updated as per fix https://github.com/Piwigo/Piwigo/issues/887)
2. I specified $conf['graphics_library'] = 'imagick'; in local config file, but (a) having read your documentation I am unclear as to correct use of 'imagick' or 'ext_imagick', (b) I do not see where I can check and confirm which library is actually being used.
<!-- github-comment-id:468607982 -->
In admin/include/photos_add_direct_prepare.inc.php if I replace:
if (!function_exists('gd_info'))
{
$setup_errors[] = l10n('GD library is missing');
}
by
if (!pwg_image::get_library())
{
$setup_errors[] = 'GD or ImageMagick is missing';
}
then it works fine BUT it fails at generating multiple sizes for GIF files.
In `admin/include/photos_add_direct_prepare.inc.php` if I replace:
```
if (!function_exists('gd_info'))
{
$setup_errors[] = l10n('GD library is missing');
}
```
by
```
if (!pwg_image::get_library())
{
$setup_errors[] = 'GD or ImageMagick is missing';
}
```
then it works fine BUT it fails at generating multiple sizes for GIF files.
<!-- github-comment-id:946667227 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Newly installed, Piwigo 2.9.4
ImageMagick 7.0.8-23 was properly installed after the install of Piwigo.
(GD Library was never installed on this Ubuntu system).
All other image functionality works fine in this Piwigo installation.
@plegall why is there that error reporting https://github.com/Piwigo/Piwigo/blob/master/admin/include/photos_add_direct_prepare.inc.php#L176 while there is a check there https://github.com/Piwigo/Piwigo/blob/master/admin/include/photos_add_direct_prepare.inc.php#L36
Is GD library really mandatory? I only remember that GD is used if the pictures are resized after upload
I remember GD is mandatory to read EXIF metadata. But I may be wrong!
it is to keep metadata when resizing
but to read exif that's just https://github.com/Piwigo/Piwigo/blob/b9336d7117770e304197a3afad1068eea5491a29/include/functions_metadata.inc.php#L141 -> http://php.net/manual/fr/function.exif-read-data.php (btw php 7.2 improved the readibility of exfis data nice!)
I notice that there was once a vulnerability in Imagemagick that would be exploited during the photo_add step - https://www.theregister.co.uk/2016/05/03/imagemagick/
I don't think so. I've made some search on the forum and I said a while back that GD was removing metadata when resizing.
Maybe GD is not really mandatory. What's mandatory is to have either GD or imagemagick. I've always considered GD was coming automatically with PHP. Here is maybe my mistake because today you can perfectly install PHP without GD and have ImageMagick which should be fine.
I'll make some tests without GD and only ImageMagick and if everything works fine, I'll change the condition from "is GD installed" to "is GD or ImageMagick installed".
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
You can force which one to use through the variables in the local config.
Check out website for doc forum etc
Le 14 janv. 2019 17:02, "ronankeane" notifications@github.com a écrit :
To get going with this, can I make a simple file change?
I am concerned that if I install GD, then this library may be selected over
the ImageMagick library in other parts of the programme.
It would be hard to tell, just as in this case.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Piwigo/Piwigo/issues/957#issuecomment-454057956, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAs-jTW1gAP46r7hoSGDEpqyf8mAe76jks5vDKolgaJpZM4Z3vvL
.
As found by @Teatek in #976 it's possible to use Piwigo without GD, but it will fail for GIF files (animated or not). We need to change some code to adapt ImageMagick command lines to handle static and animated gif files. As said by @mistic100 on https://piwigo.org/forum/viewtopic.php?pid=151293#p151293 and mentioned by Teatek, I agree we would need an option to disable animation on small resized GIF (maybe reusing
$conf['derivatives_strip_metadata_threshold'])I got around to installing the GD library to make the photos_add page work. A couple of issues.
While the photos_add page now works fine, it displays a message --- Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/photos/piwigo/_data/templates_c/p6jhns^561a9bf60ffeeda8e86a99ad26c0ec6395fd8cf0_0.file.photos_add_direct.tpl.php on line 327
(note my userlist.tpl is updated as per fix https://github.com/Piwigo/Piwigo/issues/887)
I specified $conf['graphics_library'] = 'imagick'; in local config file, but (a) having read your documentation I am unclear as to correct use of 'imagick' or 'ext_imagick', (b) I do not see where I can check and confirm which library is actually being used.
In
admin/include/photos_add_direct_prepare.inc.phpif I replace:by
then it works fine BUT it fails at generating multiple sizes for GIF files.