vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   A image resizer script im working on (Not a hack) (https://vborg.vbsupport.ru/showthread.php?t=43286)

Slynderdale 09-07-2002 10:49 PM

A image resizer script im working on (Not a hack)
 
Tell me what you think of this image resizer script im working on :)
Im you open to any ideas or suggestions.
The image also works within the <img tags

Script:
http://slynderdale.darktechgameing.com/image.php

That shows the example image.

The Varibles:
image
-The image name, absoulute path or url
scale
-Scales the image useing % so scale=50 is 50%
height
-The height you wanna resize the image to
width
-The width you wanna resize the image to

Note: Height and Width has more priotity then scale, so if you set the height and width, scale wont be use, and if you set the width/height and scale, the image will be reized to the width/height you put and the other will be scaled to what you put, if you dont put the width, height or scale, it will show the normal image without an resizing.

Also i wanna note, that my version of php doesnt support if resizing of gif images but there a link to a patch at www.php.net/imagegif that adds gif support, it currently supports jpegs and png's.

URL Examples:
Heres an example of using a filename/absoulute path url:
http://slynderdale.darktechgameing.c...e=php_logo.jpg

Heres an example of using a url:
http://slynderdale.darktechgameing.c...m/php_logo.jpg

Heres an example of using a url without http://:
http://slynderdale.darktechgameing.c...m/php_logo.jpg

if you dont add http:// it will automaticly add it for you unless its a filename/absoulute path

Scale Examples:
scaling at 100%:
http://slynderdale.darktechgameing.c....jpg&scale=100

scaling at 50%:
http://slynderdale.darktechgameing.c...o.jpg&scale=50

scaling at 200%:
http://slynderdale.darktechgameing.c....jpg&scale=200

Width/Height examples:

width and height =100 pixels:
http://slynderdale.darktechgameing.c...100&height=100

width =200 pixels and height =300 pixels:
http://slynderdale.darktechgameing.c...200&height=300

Scaling and Width/Height examples:
Scales the height by 50% and set the width to 100 pixels:
http://slynderdale.darktechgameing.c...e=50&width=100

Scales the width by 200% and set the height to 50 pixels:
http://slynderdale.darktechgameing.c...=200&height=50

Heres a example how it shows that width and height has a higher priority, if both are set and you set scale, it goes with the width and height, not the scale:

http://slynderdale.darktechgameing.c...ht=50&width=50

Neo 09-07-2002 11:29 PM

Wow looks really nice :)

Boofo 09-08-2002 02:09 AM

You can do that same thing with html code. Not a big trick, sorry.

Slynderdale 09-08-2002 02:26 AM

Quote:

Originally posted by Boofo
You can do that same thing with html code. Not a big trick, sorry.
This resizes the image itself, this includes the pixels and image size, the smaller you make the image, the smaller the image size, with html, it keeps the image size but just srinks how the image looks, this script lets you create dyanmic image resizes without having to save the resized image to the hard drive, if you check the image properties the image pixels and bytes change as you resize the image then you can use the link with html like:

Code:

<img="http://slynderdale.darktechgameing.com/image.php?image=php_logo.jpg&scale=50&width=100">
You can easily add image resizes without having the image saved to a data base or hard drive.

Lesane 09-08-2002 06:01 AM

Very nice. :)

Highlander 09-16-2003 05:03 AM

where is your script ? .. i like it and i would use it if want give it to me :)

Xenon 09-16-2003 05:01 PM

i wrote something exactly like that about a month ago.
also with a watermark function.

as you can see, such scripts can be usefull from time to time ;)

Dolby 09-17-2003 12:16 AM

Quote:

Originally Posted by Highlander
where is your script ? .. i like it and i would use it if want give it to me :)

Yes, I would like to see this script as well. I have a skin gallery and would love to show tumbnails and various sizes.

edit WHooops... didnt notice the date of the orignal post.

edit agin: this thread at sitepoint is worth a look... http://www.sitepointforums.com/showt...=image+resizer


All times are GMT. The time now is 01:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01041 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete