![]() |
|
| |||||||
| Suggestions Make suggestions for changes to MMOwned.com |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||
| ||||
| [imgt] / [img] - Image Thumbnails Hi there. When posting new edits or whatever its always nice to post screens. But too big screens **** up the layout here and links arent clicked that often. So I suggest doing thumbnails if a picture is above a specific width or introducing the [imgt] tag. This tag may create a thumbnail and include it in the post. It may work like this: Code: [imgt]http://www.pressebox.de/attachment/40919/Perfect+Image+11+Rechts+3D+300dpi+rgb.jpg[/imgt] ![]() The script iteself isn't that hard: Code: <?
$PicPathIn="../bilder/";
$PicPathOut="../bilder/out/";
$bild="Foto.jpg";
$size= GetImageSize("$PicPathIn"."$bild");
$breite=$size[0];
$hoehe=$size[1];
$neueBreite=100;
$neueHoehe= intval($hoehe*$neueBreite/$breite);
if($size[2]==1) {
// GIF
$altesBild= imagecreatefromgif("$PicPathIn"."$bild");
$neuesBild= imagecreate($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
imageGIF($neuesBild,"$PicPathOut"."TN"."$bild");
}
if($size[2]==2) {
// JPG
$altesBild= ImageCreateFromJPEG("$PicPathIn"."$bild");
$neuesBild= imagecreate($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
ImageJPEG($neuesBild,"$PicPathOut"."TN"."$bild");
}
if($size[2]==3) {
// PNG
$altesBild= ImageCreateFromPNG("$PicPathIn"."$bild");
$neuesBild= imagecreate($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
ImagePNG($neuesBild,"$PicPathOut"."TN"."$bild");
}
echo "Altes Bild:<BR>";
echo "<IMG SRC=\"$PicPathIn$bild\" WIDTH=\"$breite\" HEIGHT=\"$hoehe\"><BR><BR>";
echo "Neues Bild:<BR>";
$Thumbnail=$PicPathOut."TN".$bild;
echo "<IMG SRC=\"$Thumbnail\" WIDTH=\"$neueBreite\" HEIGHT=\"$neueHoehe\">";
?> Code: thumb.php?img="path:\\to.the.image" -> "PNG.a. ...d.a54.56.12." You may also do it in CSS / javascript .. but meeh ^^ |
|
#2
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails [Only registered and activated users can see links. ] Why just don't use one of the Thumbnail links from imageshack?..
__________________ ![]() |
|
#3
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Because not everyone is using Imageshack? |
|
#4
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails
__________________ ![]() |
|
#5
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Yes you're right Schlumpf, I forgot that ><.
__________________ ![]() |
|
#6
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Schlumpf ist richtich
__________________ ![]() |
|
#7
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Personally, i hate those (the tumbnails). I can never see them, and hate opening them in another screen.
__________________ "If I and everyone else could contribute to MMOwned like you do it would be a terrific place." Don't PM me with request, only Questions |
|
#8
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails me too, mabey you could just make they screenshots a bit smaller
__________________ |
|
#9
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails The best option imo is to keep the SS at/size it to 1280x1024 or higher so people have to scroll to see it all. /ass. ![]()
__________________ ![]() |
|
#10
| |||
| |||
| Re: [imgt] / [img] - Image Thumbnails sounds cool, though why is the script coded in german ?? lol (yes i know you are german schlumpf but english scripts are win )Now, i still vote for this though keep in mind the forum will use power on resizing the images aka it could make the forum slower. |
|
#11
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails |
|
#12
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails /signed (to short)
__________________ ![]() |
|
#13
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Cant see this being implemented. If people were just considerate then they would just post screenshots at half size with some JPEG compression (for some reason people like to have their 1000 x 800 images at 100% quality....) |
|
#14
| |||
| |||
| Re: [imgt] / [img] - Image Thumbnails Ah ok, it's still nice you find the script Schlumpf +rep as i actually needed one It's php right ? |
|
#15
| ||||
| ||||
| Re: [imgt] / [img] - Image Thumbnails Its php. You did not +rep :P |
![]() |
| Thread Tools | |
| |