# Imrotate won't fill when called

**URL:** <https://discourse.julialang.org/t/imrotate-wont-fill-when-called/64630>\
**Category:** General Usage\
**Created:** [July 14, 2021, 12:14pm UTC](https://discourse.julialang.org/t/imrotate-wont-fill-when-called/64630 "2021-07-14T12:14:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAgho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jagho/32/33240_2.png) [@JAgho](https://discourse.julialang.org/u/JAgho)\
**Post date:** [July 14, 2021, 12:14pm UTC](https://discourse.julialang.org/t/imrotate-wont-fill-when-called/64630/1 "2021-07-14T12:14:50Z")

</div>

I’m trying to use imrotate with control of fill values from ImageTransformations.jl. This has a couple of prerequisites for use, namely Interpolations.jl to permit filling of values other than NaN

```julia
using Images
using Interpolations

```

I then try to rotate an image:

```julia
b = ones(20,20)
c = imrotate(b, 1, axes(b); fill=0.0)
julia> c = imrotate(b, 1, axes(b); fill=0.0)
20×20 Array{Float64,2}:
 NaN NaN NaN NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN NaN
 NaN NaN NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN
 NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN
 NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN
   ⋮ ⋮ ⋮ ⋮
 NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN
 NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN NaN NaN
 NaN NaN NaN NaN NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN NaN NaN NaN NaN

```

Clearly the NaNs aren’t supposed to be here. What am I doing wrong? I’ve also tried `fillvalues=0.0` to no effect.

---

<div class="post-metadata">

**Author:** ![rafelafrance](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafelafrance/32/26549_2.png) [@rafelafrance](https://discourse.julialang.org/u/rafelafrance)\
**Post date:** [July 21, 2021, 2:18pm UTC](https://discourse.julialang.org/t/imrotate-wont-fill-when-called/64630/3 "2021-07-21T14:18:25Z")

</div>

Rookie mistake. I’ve been reading the documentation wrong: Remove the keyword and all is right with the world.

```julia
begin
	rot = imrotate(smaller, 4 * π / 180, RGB(0.0, 0.0, 0.75))
	rot
end

```

---

<div class="post-metadata">

**Author:** ![JAgho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jagho/32/33240_2.png) [@JAgho](https://discourse.julialang.org/u/JAgho)\
**Post date:** [July 22, 2021, 3:20pm UTC](https://discourse.julialang.org/t/imrotate-wont-fill-when-called/64630/4 "2021-07-22T15:20:50Z")

</div>

Knew it had to be something simple like that. This works!
