Welcome Guest, Not a member yet? Register   Sign In
Image resizing - maintain ratio but within boundaries
#1

[eluser]prawn_king[/eluser]
Hello!

I have a bit of an issue wherein I need to take an uploaded image, resize it a few times for different areas and maintain the ratio, but within a maximum width and height. The image needs to be resized into boxes that are of varying shape - some more or less square, others portrait for example.

For display, I'm using CSS to centre the image horizontally/vertically in a div of fixed size but every now and again an image will burst out and be larger than the maximum dimension (happens both for width & height). It seems to be that master_dim will only take into account one or other of the sizes. While I understand that is intentional - I was wondering if there was a way of setting max boundaries?

Does any of that make sense? I have a feeling it's too late for me to be fully cohernt, so for that, I apologise!


Messages In This Thread
Image resizing - maintain ratio but within boundaries - by El Forum - 12-06-2010, 08:40 PM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-06-2010, 09:19 PM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-06-2010, 09:34 PM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-06-2010, 09:53 PM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-07-2010, 02:15 AM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-07-2010, 08:04 PM
Image resizing - maintain ratio but within boundaries - by El Forum - 12-08-2010, 02:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB