# Write text on GMImageMBS object

**URL:** <https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111>\
**Category:** Extras\
**Created:** [July 22, 2024, 10:43am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111 "2024-07-22T10:43:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 22, 2024, 10:43am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/1 "2024-07-22T10:43:42Z")

</div>

Hi, I have an image loaded via GMImageMBS object. How can I write a text on it? I managed to draw a rectangle, but I would also need to write on it, without bothering the Picture object which, I have verified, tends to transform the image, changing its colors.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 8:13am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/2 "2024-07-23T08:13:57Z")

</div>

I seem to be succeeding by using “CompositeImage”, thus creating a picture and writing via the Graphics object.

I only have one problem: if I use the GMImageMBS constructor passing the picture object and then calling CompositeImage on the image to overlay the text on, it doesn’t work. If instead I save the Picture to file and use the GMImageMBS constructor which takes the FolderItem, yes. There must be some details that escape me.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 23, 2024, 9:11am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/3 "2024-07-23T09:11:39Z")

</div>

Please use annotate method to write.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 10:19am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/4 "2024-07-23T10:19:05Z")

</div>

DebugimageMBStest: Unable to access configuration file (type.mgk) reported by C:\Users\Christian\Desktop\GraphicsMagick-8\magick\blob.c:2162 (GetConfigureBlob)

```auto
dim geom as new GMGeometryMBS(200,100)
myObj.annotate("example", geom)

```

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 23, 2024, 11:16am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/5 "2024-07-23T11:16:28Z")

</div>

That is strange as type.mgk is built-in to the plugin.

So you are testing on Windows?

I just tried it here:

```auto
Var White as new GMColorGrayMBS(1)
Var geo as new GMGeometryMBS("300x200")
var g as new GMImageMBS(geo, white)

g.annotate("Hello World", g.SouthGravity)

Backdrop = g.CopyPicture

```

Works just fine.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 11:23am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/6 "2024-07-23T11:23:05Z")

</div>

> [@Christian\_Schmitz](#):
>
> ```auto
> Var White as new GMColorGrayMBS(1)
> Var geo as new GMGeometryMBS("300x200")
> var g as new GMImageMBS(geo, white)
> 
> g.annotate("Hello World", g.SouthGravity)
> 
> Backdrop = g.CopyPicture
> 
> ```

Even this simple example gives me the same error

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 23, 2024, 11:36am UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/7 "2024-07-23T11:36:48Z")

</div>

and the details please?

Which Xojo version? Which Plugin version? What operation system? What build target?

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 12:39pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/8 "2024-07-23T12:39:28Z")

</div>

Xojo 2019 3.1

Plugin: I don’t remember the exactly versione  
MBS Xojo GraphicsMagick Plugin.xojo\_plugin 24/02/2021 10:56, 61260 KB

OS: Windows 10

Build Target: Windows

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 23, 2024, 12:47pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/9 "2024-07-23T12:47:48Z")

</div>

Please move to a current version.

3 year old plugin may be broken.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 12:56pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/10 "2024-07-23T12:56:30Z")

</div>

How can I update to a recent version? purchasing an upgrade?

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [July 23, 2024, 1:09pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/11 "2024-07-23T13:09:12Z")

</div>

Download the latest version and install it. Test to make sure it works in debug mode first. If that resolves the issue then, yes, consider purchasing the update.

Side note, I made an app that helps you manage plugins and I teamed up with Christian and Björn so that it has the ability to read and display plugin versions to you. [Plugins Pro](https://strawberrysw.com/plugins-pro) is free of charge and available for both Mac and Windows.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 23, 2024, 1:16pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/12 "2024-07-23T13:16:12Z")

</div>

As Tim writes, please test first with newer version.

And if you like to buy a license, check out the OmegaBundle since it includes MBS Plugins.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 1:19pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/13 "2024-07-23T13:19:19Z")

</div>

![Senza nome](https://forum.xojo.com/uploads/default/original/3X/8/1/81129c870a386e8557d05b270a61495e976e025f.png)

this is the situation

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [July 23, 2024, 1:34pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/14 "2024-07-23T13:34:30Z")

</div>

You could use the Plugin Sets feature to maintain a copy of your current MBS plugin setup and test out the [latest MBS 24.3 plugins](https://www.monkeybreadsoftware.de/xojo/plugins.shtml)

Create a new set and name it something like “New MBS Test”, uncheck the checkbox next to the “MBS” plugin set, click Apply Changes to deactivate the plugins, and install the 24.3 versions in the “New MBS Test” set.

If the new version doesn’t work out, you can revert to the old ones by changing the checkboxes next to the Plugin Sets and clicking Apply Changes.

---

<div class="post-metadata">

**Author:** ![Ant\_Col](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/c0e974/32.png) [@Ant\_Col](https://forum.xojo.com/u/Ant_Col)\
**Post date:** [July 23, 2024, 1:43pm UTC](https://forum.xojo.com/t/write-text-on-gmimagembs-object/81111/15 "2024-07-23T13:43:21Z")

</div>

I prefer to manually manage the copying of the plugin files from the folder.  
The problem is that, just for this function, the company I work for cannot buy the new plugins.  
So I’m considering a hack by creating a Picture and applying it over my image
