# Setting Rmagick resolution when reading in an image?

**URL:** <https://www.ruby-forum.com/t/setting-rmagick-resolution-when-reading-in-an-image/92057>\
**Category:** Ruby\
**Created:** [April 15, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/setting-rmagick-resolution-when-reading-in-an-image/92057 "2007-04-15T14:43:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 15, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/setting-rmagick-resolution-when-reading-in-an-image/92057/1 "2007-04-15T14:43:21Z")

</div>

Dear all,

I am having problems when reading in an image (PS/PDF/TIF):  
I need to read in images of these formats, cut them in two and  
export them. Unfortunately, using

im=Magick::Image.read(filename).first

produces only images with resolutions of 72x72, which is  
too blurry (I need 600x600).  
I have tried

im.density=“600x600”,

and

im.x\_resolution=600

im.y\_resolution=600

after reading in, and resampling

im.resample(600,600),

but without success. Is there a way to tell Rmagick what the resolution  
is when reading in a file ?

Thank you very much!

Best regards,

Axel
