Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2007-12-12 19:28:05

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Thanks, I really appreciate your taking the time to look into this. I’ve been trying lots of different images and it does seem to be the really big ones that fail to appear. But the filesize is only 940 KB for the pic of the house, 546 KB for another…

I’ll look into the memory_limit tomorrow, it’s getting late and I’ve got kids to put to bed…

Thank you so much for the help!

Offline

#26 2007-12-12 20:07:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

It’s not file-size that matters, but the dimensions of the image that is being re-sized: take height x width x 4 bytes and that’s reasonably close to how much memory is needed.

Offline

#27 2007-12-12 21:07:22

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

ok, I suspected it might be something like that. According to that formula, resizing one of these images would take about 38 MB of memory… Looks like I’ll be doing some repetitive photoshopping in the near future…

Offline

#28 2007-12-12 21:21:55

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

helsinkifrostbites wrote:

ok, I suspected it might be something like that. According to that formula, resizing one of these images would take about 38 MB of memory… Looks like I’ll be doing some repetitive photoshopping in the near future…

that calculation seems a bit odd. your 24.jpg (which is i believe 2048px by 1536px) would take about 12M. are you really uploading images 3 times that size?

either way sorry if the plugin can’t help you out. as far as i can tell theres no way the plugin can get around your servers PHP/GD’s memory limitations. i can upload and resize images that size (2048px by 1536px) with no issues on my two different hosts so its up to your host to up your memory limit if they can.

if it helps any, you can just set up a simple batch resize script in photoshop that should whip through a directory of images and resize them automatically for you.

Last edited by iblastoff (2007-12-12 21:23:41)

Offline

#29 2007-12-12 21:36:06

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

yeah, the 24.jpg is that, but 21.jpg is 3872×2592px. Which is mad.

I am going to have a word with all the contributors at some point, but I’m expecting a fair deal of blank stares when I start talking about pixels and image manipulation software.

This is the problem you see, it’s a multi-user site with profile pages and blogs, and about 25 authors contributing material. And a lot of them are middle-aged farmers and that sort of thing. Just using email is a bit of a challenge.

I have no problems resizing images, I’m a graphic designer by trade after all, but this means I have to keep checking the site regularly for oversized images that the users keep popping in every now and then. I can see that becoming tedious rather quickly.

Offline

#30 2007-12-12 21:51:07

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

i completely understand what you mean. one reason i slapped this plugin together was to get around the same issue you’re having with ‘laymen’ not having any idea how to resize images (or are just too lazy to).

another was to get over the hurdle of textpatterns single “image” -> “thumbnail” relationship. on one site with product images (where one image would require a small thumbnail, a large version and then another medium sized thumbnail) i basically had to upload the image twice to get the two different thumbnails. the client had no idea why they had to do this :( now with this plugin i can just use different forms to output the same image in different dimensions and voila.

places like flickr have no issue resizing because they’re probably running on dedicated servers with tons of memory available. for the rest of us typically using shared hosted services we just have to live with their limitations :(

just for fun im gonna see how much php/gd can be pushed to pull off resizing 3872 × 2592 images

Last edited by iblastoff (2007-12-12 21:54:12)

Offline

#31 2007-12-12 22:09:14

helsinkifrostbites
Member
From: Ystad, Sweden
Registered: 2007-11-16
Posts: 47
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Well I’m still going to keep your plugin on the site to deal with the pics that aren’t quite that enormous. At least it will stop the layout from breaking. If it comes to a choice between the red x and a 3872px jpg, I’ll take the red x.

Anyway now I understand what was wrong, and that’s a relief in itself.

Thanks again for your help and your time, and a great plugin. I just gave it an impossible task. ;P

Offline

#32 2008-02-08 08:18:52

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Steve, is this working with 4.06, I’m just getting a red cross where the image should be?

Cheers
Lee

Offline

#33 2008-02-08 10:18:23

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

lee wrote:

Steve, is this working with 4.06, I’m just getting a red cross where the image should be?

works for me in 4.0.6

Offline

#34 2008-02-08 10:37:42

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

steve, i forgot to thank you! this plugin is amazing. works super fast and smooth here…

just to let you know: there’s a typo in the plugin’s help. (might confuse some people)

<txp:image id=“3” height=“300” /> will resize and output the image with an id of “3” with a maximum width of 300 px. The height will automatically be calculated and resized proportionally

should be <txp:lam_image id="3" height="300" />, obviously ;)

how complicated would it be to allow for image cropping aswell? i don’t necessarily need this at the moment but it would come in super handy for example if one is forced to use square thumbnails and so on…

Offline

#35 2008-03-03 11:48:27

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

Hey iblastoff. Does this plugin have the capability to crop an image like the textpattern thumbnails? I’m thinking this would be a killer function to make standard image sizes on menus or front pages. The individual article could have the original image proportions or scale.


Art Rogue – Fine Art Photography

Offline

#36 2008-03-03 11:56:53

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: lam_dynamic_image (on-the-fly article image resizing and display)

mattmikulla, the height will automatically be calculated and resized proportionally by the original scale :)

standard image sizes on menus or front pages

Remember that it uses a lot of memory and can be very slow. With highbandwight site, you possibly can end up into pit of doom ;) The onfly resizing is good, but don’t use it too much.

Last edited by Gocom (2008-03-03 12:01:03)

Offline

Board footer

Powered by FluxBB