Author Topic: max thumbnail height and width  (Read 2105 times)

0 Members and 1 Guest are viewing this topic.

Offline patrick_

  • Pre-Newbie
  • Posts: 2
    • View Profile
max thumbnail height and width
« on: February 04, 2008, 07:24:51 PM »
I do not allow my users to upload thumbnails, all are being created by 4images.

The images uploaded are screen captures. So the dimensions vary a lot. I want a 4:3 image to be smaller than 16:9 - so I set height to 90 (that would make 160x90 and 120x90 thumbs). Now the problem is when I add a picture in 2,35:1 (theater) it thumb will be 212x90, but I would like it to be smaller than the 16:9.

I hope someone understands this horrible explanation. Some numers to understand better:
1,33:1 = 120x90
1,78:1 = 161x90
2,35:1 = 161x69

so actually I just want to limit width to 161 and height to 90 when auto-creating thumbs.

I hardly know PHP (just enough to make small changes to code), but know nothing about ImageMagick, GDLibrary, or NetPBM. BTW I'm using GD for no particular reason, my server has all three and I didn't know which one to choose.
I guess it should be an easy thing to do, but just don't know how to do this in PHP.

Thanks in advance.

Regards,
Patrick
« Last Edit: February 07, 2008, 05:52:21 PM by patrick_ »