Image file upload facility added to the forum

Forum News, Announcements and any issues you're having with the forum

Moderator: myglaren

User avatar
GiveMeABreak
Forum Admin Team
Posts: 7111
Joined: 15 Sep 2015, 19:38
Location: West Wales
My Cars: '09 C5 X7 2.0 HDi Exclusive Mativoire Beige (The Golden Hornet)
'07 C3 1.6 HDi Exclusive Aluminium Grey (The Silver Hornet)
Past:
'76 GS 1000 Cedreat Yellow (yuk)
'79 GS 1220 Geranium Red
'78 CX 2.4 Turbo Prestige C-Matic Nevada Beige
'84 CX 20 Polar White
'90 XM 2.0 SX Polar White
'93 XM 2.0 Turbo Prestige Polar White
'94 XM 2.0 Turbo Prestige Emerald Green Pearlescent
'98 C15 Romahome White
'99 Xantia 2.0 HDi SX Hermes Red
'01 C5 2.0 HDi SX Wicked Red
'05 C5 2.0 HDi Exclusive Obsidian Black
x 488

Re: Image file upload facility added to the forum

Post by GiveMeABreak » 08 Aug 2017, 17:35

Odd, considering that was a JPG I uploaded from your email.
0x
Marc

User avatar
myglaren
Forum Admin Team
Posts: 13892
Joined: 02 Mar 2008, 14:30
Location: Washington
My Cars: 2003 C5 2.0 HDi 110 SX 221,400
x 232

Re: Image file upload facility added to the forum

Post by myglaren » 08 Aug 2017, 17:41

It is - I uploaded the .jpg too but remembered a glitch a few weeks back where converting to a .png worked.

IIRC it was something in the phone's metadata that cause the original problem.
0x
________________________________
Steve

Jackie Evancho

User avatar
xantia_v6
Forum Admin Team
Posts: 4853
Joined: 09 Nov 2005, 23:03
Location: Christchurch, New Zealand
My Cars: -
1997 Citroen Xantia V6 (France)
1999 Citroen XM V6 ES9 (France)
2011 Peugeot 308 CC THP 155 (NZ)
1975 Jaguar XJ-S pre-HE (NZ)
x 147

Re: Image file upload facility added to the forum

Post by xantia_v6 » 08 Aug 2017, 19:08

Can you convert the png back to jpg and try again?
0x

User avatar
bobins
Donor 2016
Posts: 1346
Joined: 05 Jul 2012, 18:07
Location: Midhurst, West Sussex
My Cars: C5(X7)
Mazda BT-50
Land Rover SIII SWB
VFR800
x 197

Re: Image file upload facility added to the forum

Post by bobins » 08 Aug 2017, 19:51

I had an issue recently where images straight off my phone wouldn't upload, but simply renaming (and saving) them in some image viewing software allowed me to upload them. They weren't resized or anythig else - just renamed.
0x
C5 2009 2.0HDi VTR+ NAV

User avatar
xantiav6
Posts: 122
Joined: 06 Jun 2004, 22:31
Location:
My Cars:
x 4

Re: Image file upload facility added to the forum

Post by xantiav6 » 08 Aug 2017, 19:57

I can now reproduce the problem here, so I will investigate and report back.
1x

User avatar
Mandrake
Posts: 7383
Joined: 10 Apr 2005, 17:23
Location: North Lanarkshire, UK
My Cars:
x 114

Re: Image file upload facility added to the forum

Post by Mandrake » 08 Aug 2017, 20:37

xantiav6 wrote:
08 Aug 2017, 19:57
I can now reproduce the problem here, so I will investigate and report back.

At least I'm not going mad. :wink:

By the way the picture originates from Video taken from my Dashcam in MOV format, with a still processed and screen grabbed at 1920x1080 using Datakam Player (also known as Registration Viewer) and then cropped using Microsoft Paint. So the image would have been 1920x1080 before MS paint cropped it.

However when I check the metadata in the file I don't see 1920x1080 anywhere, only the correct cropped resolution...
0x
Simon

1997 Xantia S1 3.0 V6 Auto Exclusive in Silex Grey
2011 Peugeot Ion Full Electric in Silver

1977 G Special 1129cc LHD
1978 CX 2400
1997 Xantia S1 2.0i Auto VSX
1998 Xantia S2 3.0 V6 Auto Exclusive

User avatar
xantia_v6
Forum Admin Team
Posts: 4853
Joined: 09 Nov 2005, 23:03
Location: Christchurch, New Zealand
My Cars: -
1997 Citroen Xantia V6 (France)
1999 Citroen XM V6 ES9 (France)
2011 Peugeot 308 CC THP 155 (NZ)
1975 Jaguar XJ-S pre-HE (NZ)
x 147

Re: Image file upload facility added to the forum

Post by xantia_v6 » 08 Aug 2017, 21:32

I don't know exactly what is happening, but the downsizing of uploaded images is done client-side in your browser, using a library called plupload. This is apparently failing for that file, causing the full size image to be uploaded, which is rejected by our server which was expecting a downsized image.
I had forgotten that moderators and administrators are exempt from the file size limit, so despite the downsizing failing, the image uploaded OK.
0x

User avatar
xantia_v6
Forum Admin Team
Posts: 4853
Joined: 09 Nov 2005, 23:03
Location: Christchurch, New Zealand
My Cars: -
1997 Citroen Xantia V6 (France)
1999 Citroen XM V6 ES9 (France)
2011 Peugeot 308 CC THP 155 (NZ)
1975 Jaguar XJ-S pre-HE (NZ)
x 147

Re: Image file upload facility added to the forum

Post by xantia_v6 » 09 Aug 2017, 09:51

If you look at the image properties of the original file in windows explorer or windows photo viewer, the dimensions are given as 803x719, but it you open the file in photoshop, it says that the exif data shows 1920x1080.

I think that the forum plupload script sees the smaller dimension and concludes that the image does not need scaling, but when the forum server checks the uploaded exif header, it finds that the image is too big, should have been scaled and rejects it.

The software that made the image file is obviously faulty, but the forum software does not handle the situation very well.
0x

User avatar
GiveMeABreak
Forum Admin Team
Posts: 7111
Joined: 15 Sep 2015, 19:38
Location: West Wales
My Cars: '09 C5 X7 2.0 HDi Exclusive Mativoire Beige (The Golden Hornet)
'07 C3 1.6 HDi Exclusive Aluminium Grey (The Silver Hornet)
Past:
'76 GS 1000 Cedreat Yellow (yuk)
'79 GS 1220 Geranium Red
'78 CX 2.4 Turbo Prestige C-Matic Nevada Beige
'84 CX 20 Polar White
'90 XM 2.0 SX Polar White
'93 XM 2.0 Turbo Prestige Polar White
'94 XM 2.0 Turbo Prestige Emerald Green Pearlescent
'98 C15 Romahome White
'99 Xantia 2.0 HDi SX Hermes Red
'01 C5 2.0 HDi SX Wicked Red
'05 C5 2.0 HDi Exclusive Obsidian Black
x 488

Re: Image file upload facility added to the forum

Post by GiveMeABreak » 09 Aug 2017, 10:24

Well - investigated, just checked it out in Photoshop and you can see as Mike says the differences: Top shows image size at source and the second shows actual pixels of the image as it is before doing another resize.
NYPD2.PNG
NYPD1.PNG
That will be helpful to know for future reference.
You do not have the required permissions to view the files attached to this post.
0x
Marc

User avatar
Mandrake
Posts: 7383
Joined: 10 Apr 2005, 17:23
Location: North Lanarkshire, UK
My Cars:
x 114

Re: Image file upload facility added to the forum

Post by Mandrake » 30 Aug 2017, 11:58

I think this is still really a forum bug that the javascript client side resizer and the forum code itself don't agree on whether to use the exif data or not to find the image size.

I had been using MS Paint in Windows 7 to crop images before uploading so I thought I would install something different - the well known free paint.net. Opened an image, cropped it, saved it, tried to upload it, exact same problem. #-o

So it would appear that any photo editing software that doesn't support exif data manipulation (which is most of the free ones) will pass the original unaltered exif data (containing the original image size) through and trigger the problem. I'll see if there is a way to strip the exif data using paint.net or some other utility but it seems like a lot of faffing around to work around the inconsistency in the way the forum and client side resizer interpret the image size. :?

If they both used the same figures from the file and both ignored the exif data the issue wouldn't happen. The forum can't assume the exif data is correct because so much photo editing software doesn't support exif and may leave incorrect exif data in the file when scaling or cropping.
Last edited by Mandrake on 30 Aug 2017, 12:05, edited 2 times in total.
0x
Simon

1997 Xantia S1 3.0 V6 Auto Exclusive in Silex Grey
2011 Peugeot Ion Full Electric in Silver

1977 G Special 1129cc LHD
1978 CX 2400
1997 Xantia S1 2.0i Auto VSX
1998 Xantia S2 3.0 V6 Auto Exclusive

elma
Posts: 3930
Joined: 13 May 2007, 02:17
Location: United Kingdom
My Cars: Undisclosed
x 215

Re: Image file upload facility added to the forum

Post by elma » 30 Aug 2017, 12:04

I had one this morning that wouldn't upload, it said HTML error.
The difference between it and the others was that I had emailed it to myself so I could post from my laptop rather than my phone.
Renaming it solved the problem for me, done the simplest way on my desktop.
I don't really edit photos other than rotating them though so I doubt it's anything to do with Simons difficulties.
0x

User avatar
Mandrake
Posts: 7383
Joined: 10 Apr 2005, 17:23
Location: North Lanarkshire, UK
My Cars:
x 114

Re: Image file upload facility added to the forum

Post by Mandrake » 30 Aug 2017, 12:17

Update: I used "exif pilot" to strip the exif data from the images cropped using paint.net and sure enough they uploaded without any problem. Bit of a hassle though and not very user friendly for the less technical forum members.
0x
Simon

1997 Xantia S1 3.0 V6 Auto Exclusive in Silex Grey
2011 Peugeot Ion Full Electric in Silver

1977 G Special 1129cc LHD
1978 CX 2400
1997 Xantia S1 2.0i Auto VSX
1998 Xantia S2 3.0 V6 Auto Exclusive

User avatar
xantia_v6
Forum Admin Team
Posts: 4853
Joined: 09 Nov 2005, 23:03
Location: Christchurch, New Zealand
My Cars: -
1997 Citroen Xantia V6 (France)
1999 Citroen XM V6 ES9 (France)
2011 Peugeot 308 CC THP 155 (NZ)
1975 Jaguar XJ-S pre-HE (NZ)
x 147

Re: Image file upload facility added to the forum

Post by xantia_v6 » 30 Aug 2017, 12:17

Mandrake wrote:
30 Aug 2017, 11:58
I think this is still really a forum bug that the javascript client side resizer and the forum code itself don't agree on whether to use the exif data or not to find the image size.

I had been using MS Paint in Windows 7 to crop images before uploading so I thought I would install something different - the well known free paint.net. Opened an image, cropped it, saved it, tried to upload it, exact same problem. #-o

So it would appear that any photo editing software that doesn't support exif data manipulation (which is most of the free ones) will pass the original unaltered exif data (containing the original image size) through and trigger the problem. I'll see if there is a way to strip the exif data using paint.net or some other utility but it seems like a lot of faffing around to work around the inconsistency in the way the forum and client side resizer interpret the image size. :?

If they both used the same figures from the file and both ignored the exif data the issue wouldn't happen. The forum can't assume the exif data is correct because so much photo editing software doesn't support exif and may leave incorrect exif data in the file when scaling or cropping.

Feel free to submit a patch to phpbb or plupload.
0x

User avatar
Mandrake
Posts: 7383
Joined: 10 Apr 2005, 17:23
Location: North Lanarkshire, UK
My Cars:
x 114

Re: Image file upload facility added to the forum

Post by Mandrake » 30 Aug 2017, 12:35

xantia_v6 wrote:
30 Aug 2017, 12:17
Feel free to submit a patch to phpbb or plupload.

And if I'm not an experienced programmer in the languages they're written in ? ;)

Unfortunately I already spend way too much of my rapidly dwindling free time working on other open source projects to go and try to spend a lot of time learning yet another code-base in a language I probably don't know, (I do know some php, but not javascript) figuring out how to fix the problem properly and in a way that the developers would accept a patch for. I've been on both ends of that process many times and know what a huge amount of effort it can be for someone who is not familiar with the code or contributing guidelines of a project and/or may have marginal skills in the language in question to fix it the right way.

It's an awful lot of my time for not much benefit when someone who already knows the code could probably fix it in minutes.

I assume the developers of phpbb and/or plupload have been made aware of the issue, if so that's all I can do unfortunately. Beyond that, it just means I probably won't upload images to the forum very often because it has become too much of a hassle unless they are unedited, un-cropped images. Not everybody can afford to use photoshop to do exif friendly cropping. :twisted:
0x
Simon

1997 Xantia S1 3.0 V6 Auto Exclusive in Silex Grey
2011 Peugeot Ion Full Electric in Silver

1977 G Special 1129cc LHD
1978 CX 2400
1997 Xantia S1 2.0i Auto VSX
1998 Xantia S2 3.0 V6 Auto Exclusive

User avatar
GiveMeABreak
Forum Admin Team
Posts: 7111
Joined: 15 Sep 2015, 19:38
Location: West Wales
My Cars: '09 C5 X7 2.0 HDi Exclusive Mativoire Beige (The Golden Hornet)
'07 C3 1.6 HDi Exclusive Aluminium Grey (The Silver Hornet)
Past:
'76 GS 1000 Cedreat Yellow (yuk)
'79 GS 1220 Geranium Red
'78 CX 2.4 Turbo Prestige C-Matic Nevada Beige
'84 CX 20 Polar White
'90 XM 2.0 SX Polar White
'93 XM 2.0 Turbo Prestige Polar White
'94 XM 2.0 Turbo Prestige Emerald Green Pearlescent
'98 C15 Romahome White
'99 Xantia 2.0 HDi SX Hermes Red
'01 C5 2.0 HDi SX Wicked Red
'05 C5 2.0 HDi Exclusive Obsidian Black
x 488

Re: Image file upload facility added to the forum

Post by GiveMeABreak » 30 Aug 2017, 13:22

Can't you just use a screen capture tool to re-save the image and then upload? GIMP is open source too....
1x
Marc