How to resize images but keeping proportion

I have a lot of images at either square (500px), 500px width,
or 500px height. What I am trying to do is to fit them into a 200
by 200 area.
Now, the problem is that I am getting the images (their
location rather) from a php database that I created. Which is fine,
except because I set a repeat area (so that I don't have to put in
every picture manually) on the css, and it seems to require a
predetermine width or height to be either auto or a certain size
(in my case, 200px),
And that's the messy part. Those images with... say...
500x146 will be out of proportion. (since the 500 will be shrunk to
200 while 146 will be expanded) Square is perfectly fine because
they are getting reduced by the same increment. But the rectangles
are really giving me problems. (Defining either width or height to
be 500 and leaving out the other to be auto is not an option
either, consider I have images that are 500x321 or 321x500)
Well, the obvious solution is to resize everything to the 200
px proportion. Yet, that presents 2 problems;
1) I want to let dreamweaver do the resizing so that I can
still show the 500px images when open in new window.
2) I can't seem to find an automated way to create a square
image in photoshop then copy the 500px images onto it, resize,
save, and close. (I tried, the sequence is impossible... or unless
someone has a much more clever solution than I do. Or maybe they
can write me a script?) If I do it manually, its hundreds of images
that would require days.
Do anyone have any clever solutions that can either tackle
the aspect of the original data images (thus, some solution with
photoshop) or some blatantly obvious solution that I can do with
dreamweaver. Any help that can help me accomplish my task is very
welcomed. Thanks in advance

You have to do this in two steps if you are doing it in a
graphics editor.
Figure out which dimension is the one 'out of size' for your
final 200x200
max limits. Resize that single dimension first. The other
will be no
greater than your 200 max.
If you are using PHP you can find some nice resizing
algorithms on
http://www.php.net.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Bih Wang" <[email protected]> wrote in
message
news:[email protected]...
>I have a lot of images at either square (500px), 500px
width, or 500px
>height.
> What I am trying to do is to fit them into a 200 by 200
area.
>
> Now, the problem is that I am getting the images (their
location rather)
> from
> a php database that I created. Which is fine, except
because I set a
> repeat
> area (so that I don't have to put in every picture
manually) on the css,
> and it
> seems to require a predetermine width or height to be
either auto or a
> certain
> size (in my case, 200px),
>
> And that's the messy part. Those images with... say...
500x146 will be
> out of
> proportion. (since the 500 will be shrunk to 200 while
146 will be
> expanded)
> Square is perfectly fine because they are getting
reduced by the same
> increment. But the rectangles are really giving me
problems. (Defining
> either
> width or height to be 500 and leaving out the other to
be auto is not an
> option
> either, consider I have images that are 500x321 or
321x500)
>
> Well, the obvious solution is to resize everything to
the 200 px
> proportion.
> Yet, that presents 2 problems;
> 1) I want to let dreamweaver do the resizing so that I
can still show the
> 500px images when open in new window.
> 2) I can't seem to find an automated way to create a
square image in
> photoshop
> then copy the 500px images onto it, resize, save, and
close. (I tried,
> the
> sequence is impossible... or unless someone has a much
more clever
> solution
> than I do. Or maybe they can write me a script?) If I do
it manually,
> its
> hundreds of images that would require days.
>
> Do anyone have any clever solutions that can either
tackle the aspect of
> the
> original data images (thus, some solution with
photoshop) or some
> blatantly
> obvious solution that I can do with dreamweaver. Any
help that can help
> me
> accomplish my task is very welcomed. Thanks in advance
>

Similar Messages

  • Help with reducing the size of an image but keeping the quality

    Hello,
    I am wondering how do I resize an image but keep the quality. I am creating a folder design for work and I want to include 6 images on the back each of 156px x 118px.
    The images I have are slightly different in size but for example sake one of the images that I have is 225px x 158px. The quality is very poor when I reduce the size.
    I have tried changing the ppi to 72 and to 300, I have also tried resizing all in one go and in a number of goes and I have tried the bicubic sharpener but I have just had no luck with it.
    I am wondering if anyone can help with this,
    Thanks
    Tracy

    Hi Tracy,
    A couple of questions:
    I am creating a folder design for work...
    So this is printed? How large? Pixels are not a unit-of-measure for print.
    If for print, you are looking at ppi of 300 or higher AT PRINT SIZE.
    So, say you want a 3in x 4in picture. That would mean your original would have to be at least 900px X 1200px. (ie 300ppi x width, 300 ppi x height)
    If your original files are not at least that resolution.. . it is hard to add quality after the fact. Unless your are working with vector art.
    I have tried changing the ppi to 72 and to 300, I have also tried resizing all in one go
    Be sure to do that on copies of original. Keep in mind the PPI number by itself is completely meaningless. It only has use in describing a to be printed image when combined with the print size.

  • How to resize image using java imageio

    Hello ,
    I want to know how to resize image using java imageio.
    I dont want to use java awt because i am writing a web application.
    help is very much needed
    thank you.

    Just use an AffineTransform !
    Its much easier

  • How to resize image on my mac?

    How to resize image on my mac?

    What version of Mac OS X do you have? In Preview under 10.9 Mavericks (I believe 10.8 too), this is what I see:
    The padlock is next to the unit (pixels, etc) selection box.
    Matt

  • How to resize image in flash

    Hi guys any tips or advise on how to resize an image i know
    there are various tools but is there a tool in Adobe flash
    professional and how can I do it
    cheers

    In what way do you want to resize the image? Are you
    importing graphics that you want to resize when you import them at
    runtime? Do you want to resize the images to a specific size or
    relative to one imported image? Or do you want to resize one or
    more images for a specific purpose at runtime based on some user
    input? Or is it something else?

  • How to resize image with high quality

    I refer lot of examples in image resizing. But quality of resized image not good. pls can give me solution for that with code?

    I refer lot of examples in image resizing.Have you read [_this article_|http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html]?
    db

  • How to resize image in JSP using JAI ??!!

    Please help me how to resize an JPEG image from my JSP, could I use JAI lib ? how ?

    Hello,
    I had the same problem few months ago ( in that case i used Jimi instead of JAI).
    The answer to your question is: use the java class called "Image".
    Infact you can use JAI just for load or save to disk your image that you have to resize and then use the following code to resize the image :
    Image imgResized = img.getScaledInstance(100,1,Image.SCALE_AREA_AVERAGING);
    The object "img" is the image to resize and the object "imgResized" is the image resized with width equals to 100 and with a right height.
    I used Jimi just to save my image and i think that with JAI there is a method to do this.
    You can use JAI to load in memory your image too so you can avoid problem with MediaTraker class.
    I hope that this can help you.
    Cheers.
    Stefano

  • What is the best way to erase half of an image but keep the other half of the image and make it look real

    I have an image of bracelet with a tube in the middle and need to erase the tube but keep the bracelet to make it look as though the tube was never there, what's the best tool in CS6 to use

    Look at the Content Aware Patch,  Healing Brush, and Spot Healing Brush tools.
    Photoshop Help | Content-Aware Patch and Move
    Nancy O.

  • How to resize Image Jpeg ?

    I have a problem when I scale file image Jjpeg.
    My code :
    public void resize(Image img){
    BufferredImage bimg = toBufferedImage(img);
    AffineTransform tx = new AffineTransform();
    tx.scale(125,125);
    AffineTransformOp op = new AffineTransformOp (tx,AffineTransformOp.TYPE_BILINEAR)
    bimg = op.filter(bimg, null);
    public static BufferedImage toBufferedImage(Image image) {
    if (image instanceof BufferedImage) {
    return (BufferedImage)image;
    // Determine if the image has transparent pixels; for this method's
    // implementation, see e661 Determining If an Image Has Transparent Pixels
    boolean hasAlpha = hasAlpha(image);
    // Create a buffered image with a format that's compatible with the screen
    BufferedImage bimage = null;
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try {
    // Determine the type of transparency of the new buffered image
    int transparency = Transparency.OPAQUE;
    if (hasAlpha) {
    transparency = Transparency.BITMASK;
    // Create the buffered image
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gs.getDefaultConfiguration();
    bimage = gc.createCompatibleImage(
    image.getWidth(null), image.getHeight(null), transparency);
    } catch (HeadlessException e) {
    // The system does not have a screen
    if (bimage == null) {
    // Create a buffered image using the default color model
    int type = BufferedImage.TYPE_INT_RGB;
    if (hasAlpha) {
    type = BufferedImage.TYPE_INT_ARGB;
    bimage = new BufferedImage(image.getWidth(null), image.getHeight(null), type);
    // Copy image to buffered image
    Graphics g = bimage.createGraphics();
    // Paint the image onto the buffered image
    g.drawImage(image, 0, 0, null);
    g.dispose();
    return bimage;
    }

    This is my code :
    private ImageIcon getImageIcon(String path){
    ImageIcon iIcon = new ImageIcon(path);
    if(iIcon.getIconHeight() > 125 || iIcon.getIconWidth() > 125){
    Image img = iIcon.getImage();
    int iw = img.getHeight(null);
    int ih = img.getWidth(null);
    BufferedImage bImage1 = toBufferedImage(img);
    BufferedImage bImage2 = new BufferedImage(400,400,1);
    AffineTransform tx = new AffineTransform();
    tx.scale(400,400);
    AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
    BufferedImage bImage3 = op.filter(bImage1, bImage2);
    img = Toolkit.getDefaultToolkit().createImage(bImage2.getSource());
    return (new ImageIcon(img));
    if(iIcon == null)
    return null;
    return iIcon;
    public static BufferedImage toBufferedImage(Image image) {
    if (image instanceof BufferedImage) {
    return (BufferedImage)image;
    // Determine if the image has transparent pixels; for this method's
    // implementation, see e661 Determining If an Image Has Transparent Pixels
    boolean hasAlpha = hasAlpha(image);
    // Create a buffered image with a format that's compatible with the screen
    BufferedImage bimage = null;
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try {
    // Determine the type of transparency of the new buffered image
    int transparency = Transparency.OPAQUE;
    if (hasAlpha) {
    transparency = Transparency.BITMASK;
    // Create the buffered image
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gs.getDefaultConfiguration();
    bimage = gc.createCompatibleImage(
    image.getWidth(null), image.getHeight(null), transparency);
    } catch (HeadlessException e) {
    // The system does not have a screen
    if (bimage == null) {
    // Create a buffered image using the default color model
    int type = BufferedImage.TYPE_INT_RGB;
    if (hasAlpha) {
    type = BufferedImage.TYPE_INT_ARGB;
    bimage = new BufferedImage(image.getWidth(null), image.getHeight(null), type);
    // Copy image to buffered image
    Graphics g = bimage.createGraphics();
    // Paint the image onto the buffered image
    g.drawImage(image, 0, 0, null);
    g.dispose();
    return bimage;
    When I recieve Img3 which is not same original Image (img1)
    Please help me ?

  • How to change to working with referenced images but keep library on laptop

    Hi,
    So, my iPhoto library is getting too big - I'd like to be able to have the images stored on an external drive and refer to them from within iPhoto, whilst keeping the iPhoto Library itself on the laptop. I know exactly how to do this from scratch, by unchecking 'copy items to my iPhoto library' in advanced preferences, but I'm trying to figure out how to convert my existing library, which has all the photos stored within it, to one where all the original files are on an external drive and are referenced by iPhoto. This way, I can see the previews when I'm away without the external drive attached.
    Thanks!

    There is no easy way to do it and I would strongly urge you to reconisder.
    In a Referenced Library, iPhoto creates aliases to the location of the actual file. While there is at least one app that will help you replace those aliases with the actual files (convert a Referenced to Managed library) there is no app that will convert those files to aliases that point to the new location of the files. You will need to do each file manually.
    More importantly, iPhoto has no tools to manage Referenced files. While on the same volume, aliases will track moved files. However this is not the case where the files are on different volumes. The upshot of this is that should the link to the files be broken then you could find yourself reconnecting each and every alias in your Library, one by one.
    Also, I'm not sure about 09 but earlier versions of iPhoto would not open if there were movie files in the Library that were not available at time of launch.
    You can move an entire Library to an external disk. There are firewire and usb disks now no bigger than a pack of playing cards and will run from the laptop's power supply.
    Regards
    TD

  • How do I close an image but keep PS CS6 open?

    If I am done working on an image and want to close it, but not close PS, how do I do this? IN PS CS2 there is a little X on the top right corner. I do not see it in CS6

    Your probably using tabbed document windows and photoshop cs2 had floating document windows.
    Of course you can use File>Close (Ctrl+W) or click on the small X on the tab.

  • How do I change an image but keep the effects from the previous image?

    I made a simple slideshow with 4 photos that are individually set to fade in and out in order.  I have saved this as a new file and want to change the 4 images to different ones, but still keep the same effects settings.  Seems like this should be really easy, but I just can't find a way to delete the photo without also losing the effects.  Any help is much appreciated ... Thanks!!!

    Your probably using tabbed document windows and photoshop cs2 had floating document windows.
    Of course you can use File>Close (Ctrl+W) or click on the small X on the tab.

  • IPhoto '08 resizing images (but not all)

    I have recently run into a problem which I assume is iphoto related. I never use iphoto because quite frankly I don't like it and I never have, which is why I stuck with '08 and didn't bother upgrading and this issue hasn't helped any.
    I decided to do a photo book for my girlfriend for Xmas, however with some pictures from my iphone 4s I was getting the low res error message. These were all photos taken in June and they all appear to be 360 x 270. Eveything before that is the same. However anything taken from September onwards is fine and is at full 8mp resolution. Nothing I've searched for suggests there's an issue with the phone so I'm assuming something happened when importing to iphoto and no message regarding resizing showed up at the time.
    I only really use iphoto to get the pictures off my phone. I use a card reader for my digital camera. Once the photos are off the phone I copy them to a folder I make in the pictures folder in Finder then I go into the iphoto library and delete the several copies of the pictures it, for some reason, deems necessary to make. I use it for nothing else, except the occasional slide show and photo book. I don't suppose there's any way to get them back now but has anybody had this problem before? I'd really like to know how this happened. It's really screwed me up because I took some great pictures and now I can't use any of them. Also, is there an alternative to iphoto to get pictures off my phone because the less I need to use iphoto the better.
    Thanks
    RB

    Wrong, wrong.
    You never access the photos via the File Structure, there is no need to  - oh, and by the way, there are no duplicates.
    With iPhoto you work only in the iPhoto Window. In the Library (Events or Photos view) select an image and drag it to the iPhoto Trash. Empty it. Empty the System trash. Image gone.
    To get a image out of iPhoto: File -> Export...
    Regards
    TD

  • How to resize image to flow with my theme?

    Hello there,
    I have a site (removed) and I think my logo does not flow with the rest of my theme.
    How can I resize the logo that is already uploaded to my site?
    Thanks

    Hello, could you rather post a screenshot, (Printscreen on a PC, switch to Photoshop, new document, paste, and save, then use the camera icon here to upload your image.)
    We are sorry, but we've seen too many users create posts making fake invite for critiques, just to bring traffic to their site, so we have to draw a line (nothing against you, or we don't mean that you are doing it) and remove all such links.

  • How to resize images

    Probably an easy one but I haven't found out:
    how can I resize an image (jpeg, tiff etc)??? Using standard Tiger tools that is (not having to buy stuff).
    Thx in advance
    Manfred

    Did you get a copy of iPhoto with your Mac Book Pro? If so, drag your images into it. After that, double click on an image in the iPhoto library to edit it (such as cropping or color correcting). Then, click on File > Export. On this window you will be able to resize the image and save it to another location such as your Desktop.

Maybe you are looking for

  • JTree with XML Content

    Hi Friends, I am trying to create a JTree whose data will come from a XML Document. Whenever the tree is refreshed (There is a JPopupMenu on the tree which allows the user to call refresh), the tree must update itself with the underlying XML document

  • Calibrating my monitor with other monitors

    I have calibrated my monitor so that output to my personal printer is spot-on. But when I give a CD of digital images that look good on my monitor to someone else, they look washed-out on his/her monitor. Is there a way to standardize monitors, LCD o

  • Frozen when lid closed

    My laptop is Win8.1, I have set it to do nothing when lid is closed and power options are set to stay alive. I close the laptop lid and go to work. At work I TeamViewer onto my laptop but I cannot control Firefox (I can control the rest of the OS). T

  • After getting iOS 6.1.2 wifi inactive. How fast can solve this issue in UK service center?

    For Iphone 4S - After updating to iOS 6.1.2 wifi became inactive(grayved - i can't turn it on). Phone still on warranty. I've tried everything - recover, setings resets etc. How fast can solve this issue in UK service center? I will be in London for

  • Error when running java control panel

    Hi all, I'm having trouble when running java control panel in my laptop. When I double click the java icon, a pop up message appeared saying Could not find com.sun.deploy.panel.ControlPanel. Program will now exit. How do I fix this? Thx a bunch