image resize

Web page creation, programs, scripts, PHP, SQL?

Moderator: Moderators

Postby darenwilko » Thu Jul 29, 2004 3:04 pm

i have lots of images on the web.
most of them have different sizes.
I want to resize all to the same width, auto height but I want to do it online using a script.

Any idea if such script exists? java if possible or php??

thanks guys
daren//
darenwilko
 

Postby DenisF » Thu Jul 29, 2004 3:11 pm

Well Gallery (gallery.sf.net) resizes images using imagemagic or netpbm, both of which are very common methods to do what you're trying.

It shouldn't be too hard to write a script that will go over your whole library and will resize all of the images, but if your gallery script doesn't have that built it - it's gonna be a bitch to implement it.

My suggestion?
Install Gallery, it's by far the best script of it's kind, and has every feature one can dream of.

But if you're stubborn and you insist on doing it your way, there's a nice tutorial on how to do it here; <a href='http://www.phpbuilder.com/columns/michael20020712.php3' target='_blank'>http://www.phpbuilder.com/columns/michael20020712.php3</a>
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby darenwilko » Fri Jul 30, 2004 11:18 am

Hey i found this simple alternate (simple, like me :) )

anyways it only seems to work some times in IE (width resize works but height only sometimes)

although it works perfectly in mozilla? :S

whats the go, any ideas how i can solve this?

Code: Select all
<style type="text/css">
#im img {


width: auto !important; width: 289px; height: auto;
max-width: 289px; _max-height: 216px;
}
</style>


and at the image tags

Code: Select all
<div id="im" align="center" >
<br>
<a href="http://mandrake.polarhome.com/~galleryp/gallery/Random Pics/mis011.jpg" target="_new">
<img src="http://mandrake.polarhome.com/~galleryp/gallery/Random Pics/mis011.jpg" border="1"></a>
<br>mis011.jpg
</div>


Thanks
darenwilko
 

Postby DenisF » Fri Jul 30, 2004 11:27 am

Why use divs?
just put width, height tags in the <img> tag

it does work, but again - ugly code


BTW
i took the liberty to look at your site..
hmmm

why are you using redhat for the pics and my server for the content?
makes things awefully slow, best use either one - not both
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby darenwilko » Fri Jul 30, 2004 11:40 am

lol the site aint up yet... u know to much lol

hey im using mandrake for gallery cause it has your special safe mode thingy lol so i can run my image script and redhat cause my files were originally there and i aint moved em yet...

ok why use div... well you see if you have a look at the gallery in my site <a href='http://mandrake.polarhome.com/~galleryp/gallery/Picture%20Gallery.php' target='_blank'>http://mandrake.polarhome.com/~galleryp/ga...e%20Gallery.php</a> (random pics folder only has some test pics in it) and yea anyway you will see that on the left is the thumbnails auto generated and on the right once thub clicked image opens up bigger in space on the right side... and as you can see in my design i only have limited space for the pic and because it is auto generated i need a way to make the width and height to a fixed maximum width to stop it screwing up my site when people open up the pic. ok and yea i just figured that the lil bit of css and a div will resize all pics within the div to a certain width and auto height.. it work all fine in mozilla but only SOMETIMES in IE which has really stumped me PLZZZZ help. i have no idea and its driving me madddddd.
darenwilko
 

Postby jagar_freebsd » Sat Jul 31, 2004 12:32 am

find the actual size of that pic(when you resize them)
And use heavy nested tables !!! for design.(for this case make enough space on that table)
Or use php syntaxes(few tables), this is adjusting your site naturally.
Result can be vary from browser to browser.
Designers can tell you exactly what to do. . .
>>>Laugh<<< is a life energy.
User avatar
jagar_freebsd
Advanced Member
 
Posts: 58
Joined: Mon Nov 24, 2003 4:40 am
Location: Missouri, US

Postby darenwilko » Sat Jul 31, 2004 1:59 am

Code: Select all
<style type="text/css">
#im img {


width: auto !important; width: 289px; height: auto;
max-width: 289px; _max-height: 216px;
}
</style>


so there is no way i can just edit this to make it work in IE aswell?
darenwilko
 

Re: image resize

Postby papa » Tue Nov 09, 2010 3:51 pm

ImageMagick is a suite of command line programs that can perform a variety of manipulations on image files. Great if you want to write a script to convert a batch of photos at the same time.
David "papa" Meyer
Takarazuka, Japan
papa@ alpha | ia64 |debian | netbsd | redhat | vax
User avatar
papa
Senior Member
 
Posts: 146
Joined: Mon Apr 14, 2008 8:55 pm
Location: Japan Takarazuka


Return to Web development

Who is online

Users browsing this forum: No registered users and 6 guests

cron