6.0.0-beta1
7/19/25

[#10687] Small Thumbs not showing
Summary Small Thumbs not showing
Queue Ansel
Queue Version 2.0-RC2
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester simon (at) simonandkate (dot) net
Created 10/28/2011 (5013 days ago)
Due
Updated 11/03/2011 (5007 days ago)
Assigned 10/28/2011 (5013 days ago)
Resolved 11/03/2011 (5007 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/03/2011 01:47:46 PM simon (at) simonandkate (dot) net Comment #10 Reply to this comment
Thanks Michael...

Downloading the latest ImageMagick (6.7.*)and installing from source 
worked but imagick would not compile against it from pecl.

Leaving Horde using ImageMagick resolved this issue at that point.

However I wanted to see if I could get imagick working.

Removed the source installed ImageMagick, and found an rpmed version 
6.6 from Karanbir Singh for CentOS. Installed that, along with 
ImageMagick-devel, jasper, and jasper-devel, all from the same source, 
and pecl install imagick has completed and installed.

So I now have a working imagick install on a newer version of 
ImageMagick, and yes the problem is fixed.

For those that are running straight repo rpm versions of ImageMagick 
(e.g. CentOS 5.x which provides 6.2.8), your changes will be most 
helpful though. Thank you.
11/03/2011 01:36:27 PM Michael Rubinsky Comment #9
State ⇒ Resolved
Reply to this comment
While your Im version is *still* too old for this latest fix, there 
was a problem with the advertised minimum version and one of the 
effects. An alternate version of the effect was added for those cases.

While you still absolutely cannot use Imagick with your version of Im, 
you could *try* to use the latest Horde_Image package with your 
version. It's not supported, but might work.

Your best bet, however, would be to update your ImageMagick 
installation. It's quite old.
11/03/2011 01:28:01 PM Git Commit Comment #8 Reply to this comment
Changes have been made in Git for this ticket:

The '^' modifier isn't available until ImageMagick 6.3.8.
Add a much less effecient version of this effect for older versions.
See Bug: 10687

  2 files changed, 11 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/5990fd6084f4adfe63b5bbefa3ae0ed2b87390db
11/03/2011 12:27:45 PM Michael Rubinsky Comment #7
State ⇒ Not A Bug
Reply to this comment
The INSTALL document clearly states you must compile Imagick against 
version 6.2.9 or better of ImageMagick, and 6.5.7 or better is 
recommended.

Bottom line, your ImageMagick version is way old.
11/03/2011 11:09:13 AM simon (at) simonandkate (dot) net Comment #6 Reply to this comment
The command line that is failing is:

/usr/bin/convert "/tmp/imgBw7xpO"'[0]' -thumbnail 115x115^ -gravity 
center -extent 115x115 +profile "*" jpeg:"/tmp/imgSZthXH" 2>&1 convert

If I try that I get the same message as is in the logs generated by Ansel:

convert: invalid argument for option `115x115^': -thumbnail.

If I remove the ^ and run the line manually it works.
11/03/2011 10:58:02 AM simon (at) simonandkate (dot) net Comment #5 Reply to this comment
I tried reinstalling pecl imagick.

Still didn't work...

I get 500 errors with images in Ansel, and the following errors in apache log:

[Thu Nov 03 20:55:21 2011] [error] [client 192.168.1.155] PHP Fatal 
error:  Call to undefined method Imagick::setIteratorIndex() in 
/usr/share/pear/Horde/Image/Imagick.php on line 94, referer: 
https://mail.simonandkate.net/ansel/view.php?view=List
[Thu Nov 03 20:55:23 2011] [error] [client 192.168.1.155] PHP Fatal 
error:  Call to undefined method Imagick::setIteratorIndex() in 
/usr/share/pear/Horde/Image/Imagick.php on line 94, referer: 
https://mail.simonandkate.net/ansel/view.php?view=List
[Thu Nov 03 20:55:28 2011] [error] [client 192.168.1.155] PHP Fatal 
error:  Call to undefined method Imagick::setIteratorIndex() in 
/usr/share/pear/Horde/Image/Imagick.php on line 94, referer: 
https://mail.simonandkate.net/ansel/view.php?view=List
[Thu Nov 03 20:55:41 2011] [error] [client 192.168.1.155] PHP Fatal 
error:  Call to undefined method Imagick::setIteratorIndex() in 
/usr/share/pear/Horde/Image/Imagick.php on line 94

Again, setting back to ImageMagick directly and it works fine apart 
from the thumbnails with the invalid arguments.
11/03/2011 10:29:59 AM simon (at) simonandkate (dot) net Comment #4 Reply to this comment
The other non-appearing link draws this:

A fatal error has occurred
Error running command: /usr/bin/convert "/tmp/img9Sf4cm"'[0]' 
-thumbnail 50x50^ -gravity center -extent 50x50 +profile "*" 
jpeg:"/tmp/imgo6MXDT" 2>&1 convert: invalid argument for option 
`50x50^': -thumbnail.

I am using  $conf[image][driver] ImageMagick.

If I set it to use pecl imagick, none of the images appear at all and 
I get 500 errors, even though pecl list-all shows imagick as installed.

I am using ImageMagick 6.2.8.0-4.el5_5.3 as installed from CentOS 
repositories.

Setting $conf[image][driver] ImageMagick and images appear again, 
except for the thumbnail errors for /usr/bin/convert

11/02/2011 09:50:23 PM simon (at) simonandkate (dot) net Comment #3 Reply to this comment
The Add Images non-image link used on its own does this:

A fatal error has occurred
Error running command: /usr/bin/convert "/tmp/imgBw7xpO"'[0]' 
-thumbnail 115x115^ -gravity center -extent 115x115 +profile "*" 
jpeg:"/tmp/imgSZthXH" 2>&1 convert: invalid argument for option 
`115x115^': -thumbnail.

1. Ansel_Image->display() /var/www/horde4/ansel/img/thumb.php:50
2. Ansel_Image->load() /var/www/horde4/ansel/lib/Image.php:921
3. Ansel_Image->createView() /var/www/horde4/ansel/lib/Image.php:315
4. Ansel_ImageGenerator->create() /var/www/horde4/ansel/lib/Image.php:453
5. Ansel_ImageGenerator_SquareThumb->_create() 
/var/www/horde4/ansel/lib/ImageGenerator.php:101
6. Ansel_Image->applyEffects() 
/var/www/horde4/ansel/lib/ImageGenerator/SquareThumb.php:46

Details
The full error message is logged in Horde's log file, and is shown 
below only to administrators. Non-administrative users will not see 
error details.

Ansel_Exception Object
(
     [_previous:private] => Horde_Image_Exception Object
         (
             [_previous:private] =>
             [details] =>
             [message:protected] => Error running command: 
/usr/bin/convert  "/tmp/imgBw7xpO"'[0]' -thumbnail 115x115^ -gravity 
center -extent 115x115 +profile "*" jpeg:"/tmp/imgSZthXH" 2>&1
convert: invalid argument for option `115x115^': -thumbnail.
             [string:private] =>
             [code:protected] => 0
             [file:protected] => /usr/share/pear/Horde/Image/Im.php
             [line:protected] => 160
             [trace:private] => Array
                 (
                     [0] => Array
                         (
                             [file] => /usr/share/pear/Horde/Image/Im.php
                             [line] => 121
                             [function] => _raw
                             [class] => Horde_Image_Im
                             [type] => ->
                             [args] => Array
                                 (
                                     [0] =>
                                 )

                         )

                     [1] => Array
                         (
                             [file] => /usr/share/pear/Horde/Image/Im.php
                             [line] => 487
                             [function] => raw
                             [class] => Horde_Image_Im
                             [type] => ->
                             [args] => Array
                                 (
                                 )

                         )

                     [2] => Array
                         (
                             [file] => /var/www/horde4/ansel/lib/Image.php
                             [line] => 1158
                             [function] => applyEffects
                             [class] => Horde_Image_Im
                             [type] => ->
                             [args] => Array
                                 (
                                 )

                         )

                     [3] => Array
                         (
                             [file] => 
/var/www/horde4/ansel/lib/ImageGenerator/SquareThumb.php
                             [line] => 46
                             [function] => applyEffects
                             [class] => Ansel_Image
                             [type] => ->
                             [args] => Array
                                 (
                                 )

                         )

                     [4] => Array
                         (
                             [file] => 
/var/www/horde4/ansel/lib/ImageGenerator.php
                             [line] => 101
                             [function] => _create
                             [class] => Ansel_ImageGenerator_SquareThumb
                             [type] => ->
                             [args] => Array
                                 (
                                 )

                         )

                     [5] => Array
                         (
                             [file] => /var/www/horde4/ansel/lib/Image.php
                             [line] => 453
                             [function] => create
                             [class] => Ansel_ImageGenerator
                             [type] => ->
                             [args] => Array
                                 (
                                 )

                         )

                     [6] => Array
                         (
                             [file] => /var/www/horde4/ansel/lib/Image.php
                             [line] => 315
                             [function] => createView
                             [class] => Ansel_Image
                             [type] => ->
                             [args] => Array
                                 (
                                     [0] => thumb
                                     [1] => Ansel_Style Object
                                         (
                                             [_properties:protected] => Array
                                                 (
                                                     [gallery_view] => Gallery
                                                     [background] => none
                                                     [thumbstyle] => 
SquareThumb
                                                     [width] => 115
                                                     [height] => 115
                                                     [widgets] =>
                                                 )

                                             [widgets] => Array
                                                 (
                                                     [Actions] => Array
                                                         (
                                                         )

                                                 )

                                         )

                                 )

                         )

                     [7] => Array
                         (
                             [file] => /var/www/horde4/ansel/lib/Image.php
                             [line] => 921
                             [function] => load
                             [class] => Ansel_Image
                             [type] => ->
                             [args] => Array
                                 (
                                     [0] => thumb
                                     [1] => Ansel_Style Object
                                         (
                                             [_properties:protected] => Array
                                                 (
                                                     [gallery_view] => Gallery
                                                     [background] => none
                                                     [thumbstyle] => 
SquareThumb
                                                     [width] => 115
                                                     [height] => 115
                                                     [widgets] =>
                                                 )

                                             [widgets] => Array
                                                 (
                                                     [Actions] => Array
                                                         (
                                                         )

                                                 )

                                         )

                                 )

                         )

                     [8] => Array
                         (
                             [file] => /var/www/horde4/ansel/img/thumb.php
                             [line] => 50
                             [function] => display
                             [class] => Ansel_Image
                             [type] => ->
                             [args] => Array
                                 (
                                     [0] => thumb
                                     [1] => Ansel_Style Object
                                         (
                                             [_properties:protected] => Array
                                                 (
                                                     [gallery_view] => Gallery
                                                     [background] => none
                                                     [thumbstyle] => 
SquareThumb
                                                     [width] => 115
                                                     [height] => 115
                                                     [widgets] =>
                                                 )

                                             [widgets] => Array
                                                 (
                                                     [Actions] => Array
                                                         (
                                                         )

                                                 )

                                         )

                                 )

                         )

                 )

         )

     [details] =>
     [message:protected] => Error running command: /usr/bin/convert   
"/tmp/imgBw7xpO"'[0]' -thumbnail 115x115^ -gravity center -extent 
115x115 +profile "*" jpeg:"/tmp/imgSZthXH" 2>&1
convert: invalid argument for option `115x115^': -thumbnail.
     [string:private] =>
     [code:protected] => 0
     [file:protected] => /var/www/horde4/ansel/lib/Image.php
     [line:protected] => 1160
     [trace:private] => Array
         (
             [0] => Array
                 (
                     [file] => 
/var/www/horde4/ansel/lib/ImageGenerator/SquareThumb.php
                     [line] => 46
                     [function] => applyEffects
                     [class] => Ansel_Image
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [1] => Array
                 (
                     [file] => /var/www/horde4/ansel/lib/ImageGenerator.php
                     [line] => 101
                     [function] => _create
                     [class] => Ansel_ImageGenerator_SquareThumb
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [2] => Array
                 (
                     [file] => /var/www/horde4/ansel/lib/Image.php
                     [line] => 453
                     [function] => create
                     [class] => Ansel_ImageGenerator
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [3] => Array
                 (
                     [file] => /var/www/horde4/ansel/lib/Image.php
                     [line] => 315
                     [function] => createView
                     [class] => Ansel_Image
                     [type] => ->
                     [args] => Array
                         (
                             [0] => thumb
                             [1] => Ansel_Style Object
                                 (
                                     [_properties:protected] => Array
                                         (
                                             [gallery_view] => Gallery
                                             [background] => none
                                             [thumbstyle] => SquareThumb
                                             [width] => 115
                                             [height] => 115
                                             [widgets] =>
                                         )

                                     [widgets] => Array
                                         (
                                             [Actions] => Array
                                                 (
                                                 )

                                         )

                                 )

                         )

                 )

             [4] => Array
                 (
                     [file] => /var/www/horde4/ansel/lib/Image.php
                     [line] => 921
                     [function] => load
                     [class] => Ansel_Image
                     [type] => ->
                     [args] => Array
                         (
                             [0] => thumb
                             [1] => Ansel_Style Object
                                 (
                                     [_properties:protected] => Array
                                         (
                                             [gallery_view] => Gallery
                                             [background] => none
                                             [thumbstyle] => SquareThumb
                                             [width] => 115
                                             [height] => 115
                                             [widgets] =>
                                         )

                                     [widgets] => Array
                                         (
                                             [Actions] => Array
                                                 (
                                                 )

                                         )

                                 )

                         )

                 )

             [5] => Array
                 (
                     [file] => /var/www/horde4/ansel/img/thumb.php
                     [line] => 50
                     [function] => display
                     [class] => Ansel_Image
                     [type] => ->
                     [args] => Array
                         (
                             [0] => thumb
                             [1] => Ansel_Style Object
                                 (
                                     [_properties:protected] => Array
                                         (
                                             [gallery_view] => Gallery
                                             [background] => none
                                             [thumbstyle] => SquareThumb
                                             [width] => 115
                                             [height] => 115
                                             [widgets] =>
                                         )

                                     [widgets] => Array
                                         (
                                             [Actions] => Array
                                                 (
                                                 )

                                         )

                                 )

                         )

                 )

         )

)

10/28/2011 02:20:59 PM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Feedback
Reply to this comment
I have uploaded 2 pics into a new Gallery. The main pics' thumbnails 
display fine, but the small thumb in the right hand panel under 
"Simon Wilson's Galleries" does not display. The image is:

https://mail.simonandkate.net/ansel/img/mini.php?image=6&t=Thumb&b=none
I cannot reproduce this. The img src looks correct, and this works 
correctly locally.

What image driver are you using? Any errors in the horde log? What 
happens if you try to load that url directly in the browser?
The same issue occurs in the "upload photos" page where at the 
bottom it has the "Photos in this gallery"
Again, cannot reproduce this. Sounds like there is an error somewhere 
during the image processing that creates those thubnails. Check your 
logs.

10/28/2011 01:25:17 AM simon (at) simonandkate (dot) net Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ Small Thumbs not showing
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Horde is set to use a directory rather than SQL for VFS storage 
(/mnt/data/hordevfs). Apache has access to this folder.

Ansel is set to use Horde defaults for VFS, and correctly uses the folder.

I have uploaded 2 pics into a new Gallery. The main pics' thumbnails 
display fine, but the small thumb in the right hand panel under "Simon 
Wilson's Galleries" does not display. The image is:

https://mail.simonandkate.net/ansel/img/mini.php?image=6&t=Thumb&b=none

The thumbnail appears to exist, as the main thumbnail of the images in 
the gallery display fine, including this one:

https://mail.simonandkate.net/ansel/img/thumb.php?image=6&t=Thumb&b=none

The same issue occurs in the "upload photos" page where at the bottom 
it has the "Photos in this gallery"

e.g.:

https://mail.simonandkate.net/ansel/img/thumb.php?image=6&t=SquareThumb&b=none&w=115&h=115

Saved Queries