# Preventing Loss of Image Quality When Using \`imresize\`?

**URL:** <https://discourse.julialang.org/t/preventing-loss-of-image-quality-when-using-imresize/91793>\
**Category:** General Usage\
**Tags:** images, interpolations\
**Created:** [December 17, 2022, 9:38pm UTC](https://discourse.julialang.org/t/preventing-loss-of-image-quality-when-using-imresize/91793 "2022-12-17T21:38:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [December 17, 2022, 9:38pm UTC](https://discourse.julialang.org/t/preventing-loss-of-image-quality-when-using-imresize/91793/1 "2022-12-17T21:38:15Z")

</div>

Hi folks,

I am trying to shrink an image using Images and Interpolations. Whenever I shrink the image, the image is very blurry or the quality is just not so great. Here is what I am doing:

```julia
using Images
using Interpolations

imresize(load(plotsdir("feasibility", "$(plots[idx])")), ratio = .5, method = Linear())

```

What can I do to make these images less blurry? I am honestly just considering making the images themselves smaller on image creation as I am beginning to get frustrated here. Thanks! 😄

~ tcp 🌳

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [December 17, 2022, 9:57pm UTC](https://discourse.julialang.org/t/preventing-loss-of-image-quality-when-using-imresize/91793/2 "2022-12-17T21:57:25Z")

</div>

It’s possible there are alternate methods for doing the sampling.

```julia
using Interpolations

imresize(img, sz; method=Lanczos(2))

```

might be an avenue to explore… (Not necessarily this exact code - I’m just making guesses…)
