Panorama pictures in Gallery


I’ve got on Ubuntu 16.
When I try to view panorama pictures I’m getting an errors:

{“reqId”:“oIk0m1j0DgAtf99fxeET”,“remoteAddr”:“”,“app”:“core”,“message”:“Generating preview for “storage/Zdj\u0119cia/wypady/2017-02-02 far north/20170204_182519.jpg” with “OC\Preview\JPEG””,“level”:0,“time”:“2017-02-06 08:02:31”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/preview/1622271?width=1700&height=1700&c=7826e2f81b009fb2d10af40b3cd9bd5b&requesttoken=xxx%3D%3A3EPjQHc5STJSII94YHphZMmBpP7f7ljYIxbtY5WZPlI%3D",“user”:“Px2”,“version”:“”}
{“reqId”:“oIk0m1j0DgAtf99fxeET”,“remoteAddr”:“”,“app”:“PHP”,“message”:“imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Unsupported marker type 0x19 at Unknown#0”,“level”:3,“time”:“2017-02-06 08:02:31”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/preview/1622271?width=1700&height=1700&c=7826e2f81b009fb2d10af40b3cd9bd5b&requesttoken=xxx%3D%3A3EPjQHc5STJSII94YHphZMmBpP7f7ljYIxbtY5WZPlI%3D",“user”:“Px2”,“version”:“”}
{“reqId”:“oIk0m1j0DgAtf99fxeET”,“remoteAddr”:“”,“app”:“PHP”,“message”:“imagecreatefromjpeg(): ‘/storage/Zdj\u0119cia/wypady/2017-02-02 far north/20170204_182519.jpg’ is not a valid JPEG file at /var/www/nextcloud/lib/private/legacy/image.php#538”,“level”:3,“time”:“2017-02-06 08:02:31”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/preview/1622271?width=1700&height=1700&c=7826e2f81b009fb2d10af40b3cd9bd5b&requesttoken=xxx%3D%3A3EPjQHc5STJSII94YHphZMmBpP7f7ljYIxbtY5WZPlI%3D",“user”:“Px2”,“version”:“”}
{“reqId”:“oIk0m1j0DgAtf99fxeET”,“remoteAddr”:“”,“app”:“core”,“message”:“OC_Image->fixOrientation() Image is not a JPEG.”,“level”:0,“time”:“2017-02-06 08:02:31”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/preview/1622271?width=1700&height=1700&c=7826e2f81b009fb2d10af40b3cd9bd5b&requesttoken=xxx%3D%3A3EPjQHc5STJSII94YHphZMmBpP7f7ljYIxbtY5WZPlI%3D",“user”:“Px2”,“version”:“”}
{“reqId”:“oIk0m1j0DgAtf99fxeET”,“remoteAddr”:“”,“app”:“core”,“message”:“OC_Image->fixOrientation() Orientation: -1”,“level”:0,“time”:“2017-02-06 08:02:31”,“method”:“GET”,“url”:"/owncloud/index.php/apps/gallery/preview/1622271?width=1700&height=1700&c=7826e2f81b009fb2d10af40b3cd9bd5b&requesttoken=xxx%3D%3A3EPjQHc5STJSII94YHphZMmBpP7f7ljYIxbtY5WZPlI%3D",“user”:“Px2”,“version”:“”}

I cannot view the picture as well as have thumbnail generated.
Original picture might be downloaded from here:

I can’t open it with Gimp?

I think there is something non-standard about the encoding - I’m guessing it’s Samsung not quite following the format definition for panorama. For me it opens in Gwenview and Inkscape, but not in Gimp or Firefox.

When a basic jpg doesn’t open in 50% of apps (especially Gimp), you know that something funny is up with the file itself.

Beautiful photo, though. Reminds me of when I used to live in Queensland, Australia.

I guess it needs to be converted for the GD library to a supported jpg.

Nice picture, but my Gwenview displays it upside down.

BTW, i would like to have an option in Nextcloud for displaying panorama images.

my Gwenview displays it upside down.

Yeah, mine, too actually. I just forgot to mention that. It also happens in Inkscape.

i would like to have an option in Nextcloud for displaying panorama images.

Ditto, although I’d also expand that to spherical images (ie the ones you can pan left/right/up/down to look around). I know there are pretty good FOSS JS based viewers available.

I do use EOG 3.10.2 (Eye of GNOME) and totally no issues. Full picture with the see on correct side :slight_smile: .
Just wondering if the GD developers couldn’t have a look into it’s code and implement this on GD. - I know - wrong list.
It’s pity we cannot view our best pictures in nc :frowning:
Re orientation I think this might be thing with application doesn’t read rotation info in picture but I’m not expert and probably wrong…
OT: if you liked one before, here is another one from same trip:

Shutter says:


I did open an issue on GD github. Would appreciate if particular NC developer can follow up on it as they would like to have more details about the code.
Here is the link to issue on github:

@px2, did you install the NC previewgenerator app already?

On my box it fails on this command with your picture:

occ preview:pre-generate

PHP Fatal error: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Unsupported JPEG process: SOF type 0xce in /var/www/clients/client3/web12/web/lib/private/legacy/image.php on line 538

Does it work on your box?

If not, could you file a bug please?

Can anyone from developers confirm this is because of this: bug?

Yes, this is caused by libgd which will be fixed at some point. Since it’s a fatal error, there is nothing we can do to catch it.

So, bug #338 in libGD. Corrected in fix #348. Waiting for official release and distro packages updated. Someone feel free to correct me if I’m wrong.
@oparoz Thanks Olivier for confirming.


I got the same problem with the panorama images in my gallery. Did you fixed it ? How ?

Says issue #338 is fixed. My panoramic pics are displayed fine now.

1 Like