Search…

X3 Photo Gallery Support Forums

Search…
 
faxmax
Topic Author
Posts: 5
Joined: 07 Aug 2020, 02:55

Image can not be displayed

07 Aug 2020, 06:29

Hello,

i have a problem with a single picture, i dont know why, but the image can't be displayed.
You can view the problem here: https://frare.gallery/public/portraits/celia_macdonald/

https://frare.gallery/public/portraits/ ... -macdonald

i think this line is related to my problem (apache2 error log)
Code
[Fri Aug 07 12:14:44.991469 2020] [proxy_fcgi:error] [pid 16116:tid 140387707971328] [client 2a02:810d:XXXX:XXXX:XXXX:XXXX:XXXX:5f14:59705] AH01071: Got error 'PHP message: PHP Notice:  Undefined offset: 0 in /mnt/www-data/www/x3_photo_gallery/app/asset-types/image.inc.php on line 44PHP message: PHP Notice:  Undefined offset: 1 in /mnt/www-data/www/x3_photo_gallery/app/asset-types/image.inc.php on line 45PHP message: PHP Notice:  Undefined offset: 0 in /mnt/www-data/www/x3_photo_gallery/app/asset-types/image.inc.php on line 44PHP message: PHP Notice:  Undefined offset: 1 in /mnt/www-data/www/x3_photo_gallery/app/asset-types/image.inc.php on line 45PHP message: PHP Warning:  Division by zero in /mnt/www-data/www/x3_photo_gallery/app/templates/f6/61/90562b4bb614743865488354d8efd152e9eea2fe5dceae8e13a06b6e21dc.php on line 500', referer: https://frare.gallery/panel/
System:
Code
PHP Version 7.3.19-1~deb10u1

[PHP Modules]
apc
apcu
bz2
calendar
cgi-fcgi
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
geoip
gettext
gmp
hash
iconv
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
 the files looks broken
Code
$: file DSC01520_Celia_Macdonald.jpg
DSC01520_Celia_Macdonald.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, Exif Standard: [TIFF image data, little-endian, direntries=11, description=                               , manufacturer=SONY, model=ILCE-7M3, xresolution=194, yresolution=202, resolutionunit=2, software=Capture One 20 Windows]

output working file:
Code
$: file DSC01544_Celia_Macdonald.jpg
DSC01544_Celia_Macdonald.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, Exif Standard: [TIFF image data, little-endian, direntries=11, description=                               , manufacturer=SONY, model=ILCE-7M3, xresolution=194, yresolution=202, resolutionunit=2, software=Capture One 20 Windows], baseline, precision 8, 1920x1280, components 3
same (broken file) Uploaded via Nextcloud
Code
file /mnt/nextcloud-data/data/xxx.xxxxx/files/DSC01520_Celia_Macdonald.jpg
/mnt/nextcloud-data/data/max.frare/files/DSC01520_Celia_Macdonald.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, Exif Standard: [TIFF image data, little-endian, direntries=11, description=                               , manufacturer=SONY, model=ILCE-7M3, xresolution=194, yresolution=202, resolutionunit=2, software=Capture One 20 Windows], baseline, precision 8, 1280x1920, components 3
when i replace the file (with bash command cp), is the layout still wrong
Image

i reuploaded the image ( https://frare.gallery/public/portraits/ ... macdonald1 ), with the same original problem.

Greeting Max
(Sorry for my bad english)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image can not be displayed

07 Aug 2020, 10:59

Hi. Regardless of your PHP and Apache errors, this image is simply broken:
DSC01520_Celia_Macdonald1.jpg

Browser can't display it:
Image

... and of course, this means X3 can't display it either:
Image

Because it's broken/corrupt, you will definitely get errors in the backend (PHP) also. Both for the gallery layout (that attempts to read the image data), and the X3 resizer. As long as the uploaded image is broken/corrupt (for whatever reason), that is only logical so I don't see any point in diagnosing the PHP or server errors that appear when attempting to read or display the image.

Just to be 100% clear that this image is broken, you can try to load it on metapicz.com. Naturally, it doesn't work:
http://metapicz.com/#landing?imgsrc=htt ... onald1.jpg

Meanwhile, your non-broken images work fine of course:
http://metapicz.com/#landing?imgsrc=htt ... %25201.jpg

It's unclear to me exactly what the question is here. This image is clearly broken/corrupted. It doesn't display in browser, and all X3 server (PHP) attempts to get info from the image or resize it, will return ERRORS. Thus it's pointless to diagnose the PHP/server errors you have posted, which are only to be expected. I guess your question is WHY the image is broken? I assume you mean it only breaks if you upload from the X3 panel uploader? You did not make this clear in your post. If so, can you provide the original image (unbroken) so I can test from here?

It could be many things, including network corruption, outdated libJPEG (in PHP), corruption in the file EXIF data ... did you use the "resizer" in the X3 uploader? Does the image contain EXIF "orientation" data that requires the image to be rotated on upload?
 
faxmax
Topic Author
Posts: 5
Joined: 07 Aug 2020, 02:55

Re: Image can not be displayed

07 Aug 2020, 16:38

Hello Karl,

thanks for your response.
right my question is why the image is broken.

i send you a link (pm), whre you can download the image.
I use capture one and dont have problems with other images with the same export process.

i tried both, with resizer and without (same error with this picture)

Greetings Max
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image can not be displayed

07 Aug 2020, 22:38

Hi Max. I tried from here, with 1) Upload by direct file transfer (without using X3 panel), 2) Upload from X3 panel, and 3) upload from X3 panel with resizer active. I can't reproduce the issue:
[SCREENSHOT REMOVED]

One thing I noticed. When I uploaded this (original) photo to metapicz.com for diagnosing, it says there is no meta data. Is this correct? In your initial post, you showed some image output which clearly contained image meta data. Are you sure you provided me the same original image as was causing errors? I ask because it the image meta data would be one of the suspects.

Anyway, for further testing, I would need to ask for login to your X3 panel so I can try directly on your server.

Apart from that, I would perhaps check EXIF and GD values on your server just to see if it could be related. Go to panel > Tools > PHPinfo. Search "gd", and you should find the following fields (amongst others). They are same?
Code
GD Version bundled (2.1.0 compatible)
libJPEG Version 9 compatible
gd.jpeg_ignore_warning 1 1
Also search "exif":
Code
EXIF Support enabled
Supported EXIF Version 0220
Supported filetypes JPEG, TIFF
Multibyte decoding support using mbstring enabled
Extended EXIF tag formats Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
Directive Local Value Master Value
exif.decode_jis_intel JIS JIS
exif.decode_jis_motorola JIS JIS
exif.decode_unicode_intel UCS-2LE UCS-2LE
exif.decode_unicode_motorola UCS-2BE UCS-2BE
exif.encode_jis no value no value
exif.encode_unicode ISO-8859-15 ISO-8859-15
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image can not be displayed

07 Aug 2020, 23:31

Also, did you try to save captions (title or descriptions) for this image? I'm just seeing if this could be related.
 
faxmax
Topic Author
Posts: 5
Joined: 07 Aug 2020, 02:55

Re: Image can not be displayed

10 Aug 2020, 05:08

Hello Karl,

all images should contain meta-data.

Yes i uploaded exactly the same file to my nextcloud.

my gd parameters are:
Code
gd
GD Support     enabled
GD headers Version     2.2.5
GD library Version     2.2.5
FreeType Support     enabled
FreeType Linkage     with freetype
FreeType Version     2.9.1
GIF Read Support     enabled
GIF Create Support     enabled
JPEG Support     enabled
libJPEG Version     6b
PNG Support     enabled
libPNG Version     1.6.36
WBMP Support     enabled
XPM Support     enabled
libXpm Version     30411
XBM Support     enabled
WebP Support     enabled

Directive    Local Value    Master Value
gd.jpeg_ignore_warning    1    1

exif:

Code
EXIF Support     enabled
Supported EXIF Version     0220
Supported filetypes     JPEG, TIFF
Multibyte decoding support using mbstring     enabled
Extended EXIF tag formats     Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson
Directive    Local Value    Master Value
exif.decode_jis_intel    JIS    JIS
exif.decode_jis_motorola    JIS    JIS
exif.decode_unicode_intel    UCS-2LE    UCS-2LE
exif.decode_unicode_motorola    UCS-2BE    UCS-2BE
exif.encode_jis    no value    no value
exif.encode_unicode    ISO-8859-15    ISO-8859-15

After I had saved the title and description field on the broken image (DSC01520_Celia_Macdonald1.jpg) the working file DSC01520_Celia_Macdonald.jpg is also defective.

Greetings
Max
 
faxmax
Topic Author
Posts: 5
Joined: 07 Aug 2020, 02:55

Re: Image can not be displayed

10 Aug 2020, 05:35

I can now reproduce the error.

After I adjust the Title and Description fields, the image can no longer be displayed. Strangely enough, this does not happen with other images. The export process is identical.
 
faxmax
Topic Author
Posts: 5
Joined: 07 Aug 2020, 02:55

Re: Image can not be displayed

11 Aug 2020, 08:18

a short summary for all forum readers

Problem:
When i export some images with Capture One 20 Pro (Version 13.1.0.162) and select follow export settings:
(Tool) Process Recipe --> Metadata --> All Other Metadata
the image will contain IPTC data.

After i uploaded the image and adjust the fields title or description in the x3 panel, the image getting corrupt

Soluton:
Fill the fields in C1:
(Tool) Metadata --> IPTC - Content --> Headline (this affects only the view on your gallery, not the panel)
and
(Tool) Metadata --> IPTC - Content --> Description (this affects both, your gallery and the panel)
and
(Tool) Metadata --> IPTC - Status --> Title (this affects both, your gallery and the panel)

then you dont have to adjust the fields on the panel, so no error occurs

OR

go to panel Settings > Advanced > Disable "Store image settings in image as IPTC"


Additional info:
I cant reproduce the problem on other images, i dont know which IPTC field exactly or which typo in the fields caused the error.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image can not be displayed

11 Aug 2020, 09:11

Thanks. I will look further into this in next X3 release.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Image can not be displayed

04 Jan 2021, 05:04

faxmax wrote:After I adjust the Title and Description fields, the image can no longer be displayed. Strangely enough, this does not happen with other images. The export process is identical.
This has been resolved in X3.30.0 / forum
photo.gallery/blog/photo-gallery-x3-30-popup/

The problem is that PHP (at least some versions) seems to corrupt certain images when saving IPTC data, if the images already contain certain unicode IPTC data. The "solution" in this release was to not save the IPTC data if the resulting image becomes corrupt. The caption data will still get saved in page.json, but it's more a "fix" than a proper solution.