Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
RMagick: img.extract_info contains no data
Guido Holz
2/19/2008 9:53:00 AM
Hi guys...
i tried to find out the height and width of an img:
img = Image.read(absolut_path_to_a_nice_picture).first
puts img.inspect
puts img.extract_info
gets:
nice_picture.jpg JPEG 3504x2336 3504x2336+0+0 DirectClass 8-bit 2727kb
width=0, height=0, x=0, y=0
anybody knows, how I can get the sizes of an image?!?
thanks Guido
--
Posted via
http://www.ruby-...
.
2 Answers
Alex Podaras
2/19/2008 10:11:00 AM
0
Hello Guido,
Try this:
img = Image.read(absolute_path_to_a_nice_picture).first
puts 'Width: ', img.columns
puts 'Height: ', img.rows
Hope this helps
Regards,
Alex
On Feb 19, 2008, at 11:52 AM, Guido Holz wrote:
> Hi guys...
>
> i tried to find out the height and width of an img:
>
> img = Image.read(absolut_path_to_a_nice_picture).first
> puts img.inspect
> puts img.extract_info
>
> gets:
>
> nice_picture.jpg JPEG 3504x2336 3504x2336+0+0 DirectClass 8-bit 2727kb
> width=0, height=0, x=0, y=0
>
>
> anybody knows, how I can get the sizes of an image?!?
>
> thanks Guido
> --
> Posted via
http://www.ruby-...
.
>
Guido Holz
2/19/2008 10:14:00 AM
0
Alex Podaras wrote:
> Hello Guido,
>
> Try this:
>
> img = Image.read(absolute_path_to_a_nice_picture).first
>
> puts 'Width: ', img.columns
> puts 'Height: ', img.rows
>
> Hope this helps
>
> Regards,
> Alex
thats rocks! thanx ;-)
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
RMagick: img.extract_info contains no data
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password