Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
setting image resolution with Rmagick
Ant Peacocke
7/21/2006 1:39:00 PM
Hi
Has anyone had success with setting image resolution with Rmagick.
I am resizing an uploaded image with Rmagick, problem is it keeps the
original images resolution and I want to change it to 72dpi.
<<<<<< code example >>>>>>>>>>
# these are the various techniques I have tried when and after reading
the file, trying any or all of them does not work.
image_render = Magick::Image.read(temp_path){self.density=72}[0]
image_render.units=Magick::PixelsPerInchResolution
image_render.x_resolution=72
image_render.y_resolution=72
# I also tried this when writing the image to disk
image_render.write(temp_path){self.quality = 90,
self.units=Magick::PixelsPerInchResolution, self.density = 72}
<<<<<< code example : end>>>>>>>>>>
Any thoughts/ideas would be much appreciated
Best regards
Ant
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
setting image resolution with Rmagick
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