Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 19. Apr 2024, 20:55

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 22. Apr 2010, 23:41 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Hi Michael

I have a gallery where several people are uploading files for use by a group. I am having trouble downloading files from one camera in particular. It's a Canon EOS Digital Rebel.

Horizontal images download fine. Vertical images get a very small file that contains:

Code:
<br />
<b>Fatal error</b>:  Allowed memory size of 125829120 bytes exhausted (tried to allocate 10368 bytes) in <b>/home2/rochesu2/public_html/gallery/inc/imagefunctions.inc.php</b> on line <b>143</b><br />


Both vertical and horizontal files are about 3-4 MB with an image size of 3888x2592 pixels. Previews for all images are OK in TWG

Funny thing is if I try downloading with the Flash uploader, the vertical pictures download fine. Previews are also OK in Flash.

I don't recall having this issue last year.

Any guesses? I can send you a login and path if you need to look around.

Thanks!

T.


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 09:22 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Do you add a watermark when downloading originals? Because then it is loaded into memory to add it.

I don't know why vertical and horizontal images should use different php memory but it seems that is does.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 13:03 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Nope, no watermark.

Would increasing the memory even help? It looks like it is trying to allocate a lot less than the "allowed memory size" . . . or is 10368 the additional amount it's trying to add?

Can you think of anything in the EXIF that could cause this? The only difference that I can think of in the images is the EXIF rotation or orientation flag (don't remember what it's called exactly).

T.


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 13:53 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Hi Michael,

I'm trying to figure out what happens when these images are downloaded. The line referenced in the error has to do with rotation. I'm concerned that vertical images are being re-saved or re-compressed or something when they are downloaded.

I am experimenting with a pair of images taken last year from the same camera but with a slightly smaller file size. Both the horizontal and vertical images download fine in this case.

Looking at the info in the gallery, the horizontal image is 2081KB and the vertical image is 2037KB. When I download the images the horizontal image is 2036KB, but the vertical image is only 372KB. When I open the vertical image in Photoshop, the full resolution is still there. It seems that the rotated images are being re-compressed at a higher compression level which is not a good thing for our use.

Any way around this, or am I missing something?

Thanks,

T.


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 13:59 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Have you maybe enabled auto rotate in TWG? Not sure that then even the Originals are rotated.
Or have you rotated the image manually in TWG? Then the original is rotated too.
Watermarks?
Please check if you have any of this settings. Then I check how to disable this...

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 14:23 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Hi,

As I mentioned before, no watermark. I am using auto rotate, they have not been manually rotated in TWG.

It also seems that the EXIF data is stripped out of the vertical images.

Again, the originals seem to be fine. If I download a vertical image by FTP they appear to be unchanged.

Thanks!

T.


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 14:29 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This is the autorotate. I do rotate the vertical images then for the Originals too.

You can enable direct download. Then I deliver the images without any modification.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 14:52 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Setting direct download resolved the issue, but now the image opens in a browser window rather than simply downloading which adds one more step to the download process. Is there any way to avoid this?

As for the auto rotate: I am using this to show the preview images correctly. Is there any way to make it work for the previews but not when files are downloaded?

Thanks,

T.


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 15:34 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
with direct download the broser behaviour is used.

If you don't like the rotation you would only have to change one line in the code when the image is returned. If no rotation is passed to output function the original is passed like the vertical image.

in imagecreate.inc.php you have to change quite at the bottom
putimage($image_full, $twg_rot);
to
putimage($image_full);

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 15:58 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Thanks Michael, that worked.

Any chance of adding that as an option in the config so I don't have to worry about it with software updates?

Would I want to make the same change to "putwatermarkimage" as well . . . just in case I end up using watermarks someday?

Thanks!

T.


Last edited by trinkel on 23. Apr 2010, 16:37, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 17:27 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
when you use watermarks the image has to be processed - therefore there this is not possible.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 23. Apr 2010, 21:11 
Offline

Joined: 9. Feb 2009, 18:16
Posts: 80
Location: Rochester, MN USA
Thanks for your help Michael.

T.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy