Find the answer to your Linux question:
Results 1 to 4 of 4
my camera can support 320x240 size but it can't support 240x160. so i want to change image size. 320x240 get image format RGB24 how to resize image from camera....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Location
    South Korea
    Posts
    19

    i want to resize image size


    my camera can support 320x240 size

    but it can't support 240x160.

    so i want to change image size.

    320x240 get image format RGB24

    how to resize image from camera.

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    You could use the convert utility that comes with imagemagick.

    Code:
    convert -geometry  320x240 file file_with_new_size
    (replace the 320x240 with whatever you want the new size to be)

    If you want to script this, go for something among thing lines of
    Code:
    for x in $(ls)
    do 
    convert -geometry 320x240 $x new-$x
    (something like that, I don't think that code is 100%)
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Linux Engineer
    Join Date
    Jan 2005
    Location
    Chicago (USA)
    Posts
    1,028
    If you get command not found, convert is a part of ImageMagick.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Quote Originally Posted by dylunio
    You could use the convert utility that comes with imagemagick.

    Code:
    convert -geometry  320x240 file file_with_new_size
    (replace the 320x240 with whatever you want the new size to be)
    I think you will not get what you want because convert preserves image widht/height ratio so only one dimension will be 320 (or 240). I'd rather use the following version:
    Code:
    convert -resize '320x240!' file_in file_out
    Am I right?
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

Posting Permissions

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