# Bitmap background

**URL:** <https://iplug2.discourse.group/t/bitmap-background/547>\
**Category:** Uncategorized\
**Created:** [19 January 2022 19:06 UTC](https://iplug2.discourse.group/t/bitmap-background/547 "2022-01-19T19:06:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olawistedt](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olawistedt/32/232_2.png) [@olawistedt](https://iplug2.discourse.group/u/olawistedt)\
**Post date:** [19 January 2022 19:06 UTC](https://iplug2.discourse.group/t/bitmap-background/547/1 "2022-01-19T19:06:45Z")

</div>

I feel not so clever…

I try to attach a png background. I use  
pGraphics-\>AttachBackground(BACKGROUND\_FN);  
in my mLayoutFunc function.

The BACKGROUND\_FN is defined in config.h as “o303-1130x840.png”.

The “o303-1130x840.png” I have placed in “D:\OneDrive\projekt\iPlug2\Examples\o303\resources\img” and o303 is my plugin directory.

My main.rc has the resource includes “BACKGROUND\_FN PGN BACKGROUND\_FN”

When I try to run the: line pGraphics-\>AttachBackground(BACKGROUND\_FN); I get the exception division by zero at the line 122 in the IGraphicsStructs.h:

int FH() const { return (mFramesAreHorizontal ? mH : mH / mN); }

What I’m I supposed to do?

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [19 January 2022 22:31 UTC](https://iplug2.discourse.group/t/bitmap-background/547/2 "2022-01-19T22:31:14Z")

</div>

PGN? Looks wrong In the rc

---

<div class="post-metadata">

**Author:** ![olawistedt](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olawistedt/32/232_2.png) [@olawistedt](https://iplug2.discourse.group/u/olawistedt)\
**Post date:** [20 January 2022 13:28 UTC](https://iplug2.discourse.group/t/bitmap-background/547/3 "2022-01-20T13:28:22Z")

</div>

Ooh. Nice spotted! Thank you so much. Now it works 😊
