[{"data":1,"prerenderedAt":132},["ShallowReactive",2],{"blog-post-imagemagick-change-image-dpi":3,"recent-posts":86},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":11,"slugs":12,"linked_documents":14,"lang":15,"alternate_languages":16,"data":17},"av3eSRIAACgA6g-_","imagemagick-change-image-dpi",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awVEKhIAACgAG_eO&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av3eSRIAACgA6g-_%22%29+%5D%5D",[],"2026-11-23T22:45:19+0000","2026-11-24T08:00:42+0000",[13],"imagemagick-how-to-change-image-dpi",[],"en-us",[],{"title":18,"date":24,"description":25,"image":30,"content":40},[19],{"type":20,"text":21,"spans":22,"direction":23},"heading1","ImageMagick: How to Change Image DPI",[],"ltr","2026-11-23",[26],{"type":27,"text":28,"spans":29,"direction":23},"heading2","Learn how to change the DPI of an image using ImageMagick",[],{"dimensions":31,"alt":21,"copyright":6,"url":34,"id":35,"edit":36},{"width":32,"height":33},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FsN99ATT3ChzvJGRH_imagemagick-change-image-dpi.png?auto=format,compress","sN99ATT3ChzvJGRH",{"x":37,"y":37,"zoom":38,"background":39},0,1,"transparent",[41,45,49,52,55,58,61,64,67,83],{"type":42,"text":43,"spans":44,"direction":23},"paragraph","Before we start, make sure you have ImageMagick installed on your computer and your image ready in a folder. If you don't have it yet, run this command:",[],{"type":46,"text":47,"spans":48,"direction":23},"preformatted","brew install imagemagick",[],{"type":42,"text":50,"spans":51,"direction":23},"First, open your terminal and navigate to the folder that has your image. To change the DPI without touching the pixels, run this command:",[],{"type":46,"text":53,"spans":54,"direction":23},"magick input.jpg -units PixelsPerInch -density 300 output.jpg",[],{"type":42,"text":56,"spans":57,"direction":23},"Just remember to replace \u003Ccode>input.jpg\u003C\u002Fcode> with your actual filename. The \u003Ccode>-density 300\u003C\u002Fcode> option sets the new DPI, and \u003Ccode>-units PixelsPerInch\u003C\u002Fcode> makes sure ImageMagick reads that number as inches instead of centimeters. This only changes the DPI setting, so the pixel size stays exactly the same.",[],{"type":42,"text":59,"spans":60,"direction":23},"To make sure everything worked, run this command:",[],{"type":46,"text":62,"spans":63,"direction":23},"magick identify -format \"%wx%h | %x x %y %U\\n\" output.jpg",[],{"type":42,"text":65,"spans":66,"direction":23},"It prints the pixel size, the DPI and the units, something like \u003Ccode>1920x1280 | 300 x 300 PixelsPerInch\u003C\u002Fcode>.",[],{"type":68,"oembed":69},"embed",{"embed_url":70,"type":71,"version":72,"title":21,"author_name":73,"author_url":74,"provider_name":75,"provider_url":76,"thumbnail_url":77,"thumbnail_width":78,"thumbnail_height":79,"html":80,"height":81,"width":82},"https:\u002F\u002Fyoutu.be\u002FlCaXw7-97QQ","video","1.0","markster","https:\u002F\u002Fwww.youtube.com\u002F@markster1904","YouTube","https:\u002F\u002Fwww.youtube.com\u002F","https:\u002F\u002Fi.ytimg.com\u002Fvi\u002FlCaXw7-97QQ\u002Fhqdefault.jpg",480,360,"\u003Ciframe width=\"200\" height=\"113\" src=\"https:\u002F\u002Fwww.youtube.com\u002Fembed\u002FlCaXw7-97QQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen title=\"ImageMagick: How to Change Image DPI\">\u003C\u002Fiframe>",113,200,{"type":42,"text":84,"spans":85,"direction":23},"One more tip: if you want the pixels to change too, swap \u003Ccode>-density\u003C\u002Fcode> for \u003Ccode>-resample\u003C\u002Fcode>. Running \u003Ccode>-resample 150\u003C\u002Fcode> on a \u003Ccode>300\u003C\u002Fcode> DPI image cuts the width and the height in half, so it still prints at the same physical size.",[],{"results":87,"page":38,"results_per_page":130,"results_size":130,"total_results_size":131,"total_pages":38},[88,90,110],{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":11,"slugs":12,"linked_documents":14,"lang":15,"alternate_languages":16,"data":89},{"image":30,"title":18},{"id":91,"uid":92,"url":6,"type":7,"href":93,"tags":94,"first_publication_date":10,"last_publication_date":95,"slugs":96,"linked_documents":98,"lang":15,"alternate_languages":99,"data":100},"av3eTBIAACgA6g_P","imagemagick-create-sprite-sheet","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awVEKhIAACgAG_eO&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av3eTBIAACgA6g_P%22%29+%5D%5D",[],"2026-11-24T08:00:26+0000",[97],"imagemagick-how-to-create-a-sprite-sheet",[],[],{"image":101,"title":107},{"dimensions":102,"alt":103,"copyright":6,"url":104,"id":105,"edit":106},{"width":32,"height":33},"ImageMagick: How to Create a Sprite Sheet","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FU1LrFvpqX990yCxy_imagemagick-create-sprite-sheet.png?auto=format,compress","U1LrFvpqX990yCxy",{"x":37,"y":37,"zoom":38,"background":39},[108],{"type":20,"text":103,"spans":109,"direction":23},[],{"id":111,"uid":112,"url":6,"type":7,"href":113,"tags":114,"first_publication_date":10,"last_publication_date":115,"slugs":116,"linked_documents":118,"lang":15,"alternate_languages":119,"data":120},"av3eTRIAACgA6g_V","imagemagick-strip-image-metadata","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awVEKhIAACgAG_eO&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av3eTRIAACgA6g_V%22%29+%5D%5D",[],"2026-11-24T08:00:20+0000",[117],"imagemagick-how-to-strip-metadata-from-an-image",[],[],{"image":121,"title":127},{"dimensions":122,"alt":123,"copyright":6,"url":124,"id":125,"edit":126},{"width":32,"height":33},"ImageMagick: How to Strip Metadata from an Image","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FggNmYjC60Z_XNTpc_imagemagick-strip-image-metadata.png?auto=format,compress","ggNmYjC60Z_XNTpc",{"x":37,"y":37,"zoom":38,"background":39},[128],{"type":20,"text":123,"spans":129,"direction":23},[],3,84,1795515044763]