for the sake of readability...
i would like to see that images that are too large are automatically resized to fit. When a user clicks on the pic, the full-sized one is opened in a new window.
Like on this forum: http://forum.fok.nl
An example: http://forum.fok.nl/showtopic.php/385635
Seems a good idea... for a few minutes I thought you meant avatar images, since my knowledge of dutch is non-existant.
I like it, save a massive scroll horizontally to see a full image.
Umm... not sure if you can do this with PHP, but you would need to find out whether the image is under the size proportions and if it is, don't resize it, but if it isn't resize it. Get my drift?
Anyway, I think you'd probably need somethign like Imagemagick installed for this, but as I sad I don't know :).
imagemagick... or GD, which is pretty common nowadays... most hosts have it installed.
GD can be used for image manipulation? I always though ti was for image creation heh.
Nice images Seph|roth :P ;D
Quote from: Shoeb Omar on September 14, 2003, 12:09:07 PM
GD can be used for image manipulation? I always though ti was for image creation heh.
can be used for both
Quote from: Owdy on September 14, 2003, 12:09:41 PM
Nice images Seph|roth :P ;D
thought you might like 'em ;)
I don't even think they use GD or something similar for this... i think they have a PHP script that checkes the posted img's width+height, let's say 300x600.. max allowed width is let's say 200 => the script calculates the appropriate height (in this case that will be 300 400 ;)) => and the script writes those values to the <img> tag. causing the browser to auto resize the img. Tha't why the img's will look a bit cluttered afterwards.. but you don't need any lib's for it this way.
Anyway, just a guess how i could be done maybe :P
Yes, but if the image size is smaller than the limit it will stretch it.. unles syou use javascirpt, or php to detect if it;s under the size
Quote from: Shoeb Omar on September 14, 2003, 05:30:19 PM
Yes, but if the image size is smaller than the limit it will stretch it.. unles syou use javascirpt, or php to detect if it;s under the size
well, if it can detect the size (which it can ;)), you can ofcourse make it so that when it is smaller than max-width, it doesn't do anything...
Anyhow, i think this is how they do it a the forum i listed above...
Good idea. I run a forum for the development of an adventure game, and whenever people post background or concept images, it throws the whole forum out of whack for people with smaller screen resolutions (i.e. 800x600). I'd very much like to have larger images automatically resized to a maximum value -- perhaps a value that could be specified by the admin?
There's one problem though -- how to manipulate images that are located on other servers, and linked to with the [ img ] tag? Auto-displayed attachments are less of an issue since they're still on the server -- although, it would be a performance saver to generate a reduced-size image at post time instead of resizing the image every time its displayed. So maybe there ought to be a new directory for this -- something akin to /attachments/resized perhaps -- where any attachments or linked images can be resized and stored?
One way is a performance hit, the other way takes up lots of disk space. I say someone should make this a mod and leave it up to the Admin to use whichever method they prefer.
I thought this feature was already in even YaBB SE...?
Max width/height... makes your forum intolerably slow... ring any bells?
-[Unknown]
Quote from: Shoeb Omar on September 14, 2003, 12:09:07 PM
GD can be used for image manipulation? I always though ti was for image creation heh.
create a new image of an existing one... GD is great ^^
Quote from: [Unknown] on September 15, 2003, 11:19:55 AM
I thought this feature was already in even YaBB SE...?
Max width/height... makes your forum intolerably slow... ring any bells?
-[Unknown]
I suppose, but it doesn't make it open in a new window when its been clicked on does it?
the mod created by anguz is fine enough... :P
uses CSS to only display an area.. but.. is better as a mod...
Quote from: Omar Bazavilvazo on September 15, 2003, 01:31:50 PM
the mod created by anguz is fine enough... :P
uses CSS to only display an area.. but.. is better as a mod...
that's another good option...
Quote from: [Unknown] on September 15, 2003, 11:19:55 AM
I thought this feature was already in even YaBB SE...?
Max width/height... makes your forum intolerably slow... ring any bells?
-[Unknown]
well, if you take a look at the forum i listed in my initial post, you'll see that is does indeed take some time to load, but that's just because most pages over there have like 10+ large images to load... The resizing itself doesn't seem to take that long...
Plus, you have to realize that an average page does not contain that much large images... not by far, so i don't really see a problem in loading times here... maybe the technique used in YSE was a bit inefficient? (although i have never seen it with my own eyes in YSE.. )
Anyway, i think most people wouldn't mind the minimal extra loading time.. for the sake of readability ;) ANY webdesigner knows that the worst thing a webpage can contain are horizontal scrollbars.. it's just not-done.
My conclusion: I'd REALLY appreciate it if one of the dev's would implement such a feature in SMF, as an admin option.
Quote from: [Unknown] on September 15, 2003, 11:19:55 AM
I thought this feature was already in even YaBB SE...?
Max width/height... makes your forum intolerably slow... ring any bells?
Could it not be done at initial post time, have it check the size of images between the img tags and if they are bigger than an admin definable size, change the image tag to have a width height attribute proportonally. Yes the whole image would be downloaded but at least it wouldnt mess up the look of the forum?
Quote from: Ben_S on September 15, 2003, 04:35:15 PMQuote from: [Unknown] on September 15, 2003, 11:19:55 AM
I thought this feature was already in even YaBB SE...?
Max width/height... makes your forum intolerably slow... ring any bells?
Could it not be done at initial post time, have it check the size of images between the img tags and if they are bigger than an admin definable size, change the image tag to have a width height attribute proportonally. Yes the whole image would be downloaded but at least it wouldnt mess up the look of the forum?
Ben: Hm, didn't think of that.. How compatible is that with browsers besides IE?
Unknown: I guess I thought that was just for avatars.
Quote from: Seph|roth on September 14, 2003, 12:08:26 PM
imagemagick... or GD, which is pretty common nowadays... most hosts have it installed.
but not on windows ???
Quote from: Cerberus on September 18, 2003, 01:05:25 PM
Quote from: Seph|roth on September 14, 2003, 12:08:26 PM
imagemagick... or GD, which is pretty common nowadays... most hosts have it installed.
but not on windows ???
that's just too bad for those l*s*rs ;D ... they will have to live with large images then... ;)
But it's not done using GD or imagemagick or netpbm anyway.. php can handle this on it's own i think...
unfortunately I have to use windows :(
Unfortunately I do my development on windows.
-[Unknown]
you can use imagemagick in windows, they have binaries for Win32 :)
I've not tried it but it seems as though this function getimagesize (http://www.php.net/manual/en/function.getimagesize.php) would do it. I don't know the performance hit it would cause.
That's what the already available mod option does. That's why it's soo slow.
-[Unknown]
Is it slow only when used on a URL or even when used on local file? I can imagine it being slow on a URL since it basically needs to request the image an then examine it.
Quote from: Cerberus on September 18, 2003, 01:05:25 PM
Quote from: Seph|roth on September 14, 2003, 12:08:26 PM
imagemagick... or GD, which is pretty common nowadays... most hosts have it installed.
but not on windows ???
GD and Imagemagick can both be installed on windows.
Local files are a lot better, but it's really not practical to download every posted picture unless you have 20+ gigs of free space.
-[Unknown]
i do ;)
Well, that's why it's a MOD and not a thing for all the people (99%) who have < 1 gig space.
-[Unknown]