# RasterFormatException: (y + height) is outside raster

**URL:** https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953
**Category:** Processing
**Created:** [September 29, 2018, 11:11am UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953 "2018-09-29T11:11:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [September 29, 2018, 11:11am UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/1 "2018-09-29T11:11:53Z")

</div>

This program crashes with `RasterFormatException: (y + height) is outside raster`

```auto
void setup() {
  size(900, 900);
  blendMode(LIGHTEST);
  line(20, 0, 20, 900);
}

```

Anyone else seeing this behavior? Removing `blendMode` or in `P2D` or with values \<= 898 in `line` it works fine.

---

<div class="post-metadata">

### Author: ![Sarah](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sarah/32/1675_2.png) [@Sarah](https://discourse.processing.org/u/Sarah)
#### Post date: [September 29, 2018, 11:40am UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/2 "2018-09-29T11:40:59Z")

</div>

I can’t seem to be able to replicate the issue, is that your full code?

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [September 29, 2018, 11:47am UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/3 "2018-09-29T11:47:05Z")

</div>

That’s the full code. It may be related to my system (I’m on ArchLinux, using the Arch Processing package, with Intel graphics, and I think it runs on OpenJDK instead of using Oracle’s Java). Normally it all works 🙂

I’m just looking at old sketches and noticed this, but it’s fine as switching to P2D solves the issue. I wanted to know if it’s a general issue before posting an issue to GitHub. Thanks!

---

<div class="post-metadata">

### Author: ![Sarah](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sarah/32/1675_2.png) [@Sarah](https://discourse.processing.org/u/Sarah)
#### Post date: [September 29, 2018, 11:59am UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/4 "2018-09-29T11:59:23Z")

</div>

In the Processing IDE, try going to _Tools_ \> _Install “processing-java”_. When you try running your sketch after does the error happen?

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [September 29, 2018, 12:08pm UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/5 "2018-09-29T12:08:45Z")

</div>

I don’t see that option:  
 ![tools](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e4b28f80594ac28564dfc39d7e478c268e4bd47d.png)

Thanks for the tip! I know the Processing team recommends installing Processing from their website. The version I use is not built by the Processing team, so maybe that’s the issue. For me it’s just more convenient because rusning one command (`sudo pacman -Syuv`) all my programs including Processing get updated, so I will stick to that for now 🙂

Update: I downloaded the official Processing and I got the same issue with it. Maybe it’s something else particular to my system. Maybe someone else could try on Linux or with Intel graphics… @neilcsmith ?

---

<div class="post-metadata">

### Author: ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)
#### Post date: [September 29, 2018, 5:26pm UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/6 "2018-09-29T17:26:59Z")

</div>

Weird! Sounds like a bug in the custom software composite but surprised it isn’t on all platforms. Be interesting to see the stack trace of that exception.

---

<div class="post-metadata">

### Author: ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)
#### Post date: [October 4, 2018, 12:04pm UTC](https://discourse.processing.org/t/rasterformatexception-y-height-is-outside-raster/3953/7 "2018-10-04T12:04:38Z")

</div>

@hamoid interestingly, this works -

```auto
void setup() {
  size(900, 900);
  smooth(0);
  blendMode(LIGHTEST);
  line(20, 0, 20, 900);
}

```

This seems to be caused by the rendering in Java2D trying to accommodate an extra pixel for anti-aliasing shapes. There are a few bug reports in OpenJDK about it, but nothing referencing the Oracle JDK. The JDK’s are now identical, but in Java 8 the OpenJDK and Oracle JDK have different rendering rasterizers (Pisces vs Ductus - they’re now both using the open-source Marlin)

fyi - [https://bugs.openjdk.java.net/browse/JDK-8048782](https://bugs.openjdk.java.net/browse/JDK-8048782)
