Jump to content

Simple Method of Resizing Images?


justlukeyou

Recommended Posts

NOTE: that script only alters the html display size; you are still loading the full image. If you have multiple or very large images, it will consume more band width than either having 'pre-made' thumbs or actually creating a 'true' thumb on the fly. Of course on the fly means more processing time while pre-made consumes more server space.

 

Thanks, I thought I could just resize the image inside the css div I already by using the standard image width function.  But this has no affect but I dont understand why.

 

<div class='productborder'>
<a href='$link' target='_blank' width=\"80%\" ><img src='$image'/></a>
</div>

I just coded a simple image resizer/renamer/uploader for my high school website

Www.imstillreallybored.com/upload

 

Currently has no validation so it will crash if you don't enter the right data so I still want to add that and then I'm adding a dropdown so you can select the directory you want to upload to you can achieve this using glob

 

If you want I can post the code its two files, a resize class which figures out the image extension and resizes according to image according to extension php actually has processes built in to simplify everything. Then the main file sends everything to the class through a get and I have a small function to seperate the dimension variables.

 

putting 80% in the width changes the size through html which is a very bad idea first of all it actually takes longer to render an image then if it was just that size already without width styling. second of all it won't work on all images if you had an image of a person it would make them look 100 pounds more then they already are.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.