×

Discussion Board

Results 1 to 7 of 7

Thread: Image Resizing

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    33

    Image Resizing

    I'm trying to get an image to resize by using css width and height, but it does not work.

    I've seen the api bridge
    resizeImg (fileName, width, height, maintainAspectRatio, onSuccess, onError)
    function, but it says fileName is a link to a local image.

    WIll this work on a non local image, or is there a way to resize an image downloaded from the web?

    Thanks Jappit in advance, you have been helping heeps

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Image Resizing

    Hi chops1,

    not sure if/how API Bridge resizeImg can be used to resize remote images: will do a couple of tests and let you know.

    Anyway: why do you say that resizing images by using CSS attributes doesn't work?

    Pit

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    33

    Re: Image Resizing

    Using width: xxxpx and height:xxxpx does not change the size of the images,
    trying width:xxxpx and using height:auto doesn't help either.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Image Resizing

    Really strange, I've used CSS width/height for images multiple times and they correctly worked.

    On which devices are you testing? Are you using static CSS rules, or are you applying styles via JavaScript?

    Pit

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    33

    Re: Image Resizing

    I am using the background-image preperty to setup a div,
    And it seems the width and height variables only crop, not scale.

    I am testing on N8

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Image Resizing

    Hi chops1,

    width/height CSS rules do not scale background images. To actually scale an image, you have to use the <img> element, and set the image through its 'src' attribute.

    Pit

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    33

    Re: Image Resizing

    Cheers heeps.

    That would definetly explain it.

Similar Threads

  1. Resizing an image
    By IreStep in forum Symbian
    Replies: 3
    Last Post: 2008-04-28, 14:37
  2. Resizing image problem
    By Mr.Developer in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-03-22, 23:22
  3. Image Resizing Issues..
    By mayankkedia in forum Symbian
    Replies: 0
    Last Post: 2006-02-15, 10:17
  4. MMS( resizing image)
    By Utk in forum General Messaging
    Replies: 1
    Last Post: 2005-01-01, 05:10
  5. Image resizing - Wallpaper
    By ron_dunkley in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-10-10, 21:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×