Xojo Conferences
XDCMay2019MiamiUSA

[MBS] GraphicsMagick image array labels not showing in Montage (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] LaunchServicesFindApplicationForInfoMBS question
Next thread: [MBS] Selection rectangle in a canvas


[MBS] CURL MissingFUnctionExcpetion   -   Garth Hjelte
  [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   Tim Jones
    Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   Christian Schmitz
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   Christian Schmitz
    Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   Christian Schmitz
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   Christian Schmitz
    Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats
   Re: [MBS] GraphicsMagick image array labels not showing in Montage   -   William Koperwhats

[MBS] GraphicsMagick image array labels not showing in Montage
Date: 30.01.16 02:11 (Fri, 29 Jan 2016 17:11:25 -0800)
From: William Koperwhats
I’ve been beating my head against a wall for the past week or so trying to get image labels to display correctly in a “montage” using the GraphicsMagick plugin. Although the documentation for GM is very sparse, the ImageMagick library (on which it is based) documentation is much better. Here is essentially what I am trying to do:

http://www.imagemagick.org/Usage/montage/ <http://www.imagemagick.org/Usage/montage/>

What I’m finding is that the “label” for individual images does not carry over when those images are put into an ImageArray.

Dim StackingFrames As GM16ImageArrayMBS
Dim StackingMontage As GM16MontageMBS
Dim Thumbs As Picture

The Montage object gets initialized early on when the application opens. This is getting set up correctly and *isn’t* the source of my problems. The following gets called multiple times, and it should create an ever increasing "image montage”:

Sub AddImage(Frame As Picture)

'Create the image
image = New GM16ImageMBS(Frame)

‘Label the image
image.label(“Sample label”)
System.DebugLog(image.label) ' <— This displays “Sample label"

'Put the current image into the array
StackingFrames.insert(image)
System.DebugLog(StackingFrames.Image(0).label) ' <— This shows as Null
StackingFrames.image(0).label(“Sample label”) ' <— OK, let’s try it this way...
System.DebugLog(StackingFrames.Image(0).label) ‘ <— This *also* shows as Null

'Update the thumbnails
Thumbs = StackingFrames.montageImages(StackingMontage).Image(0).CopyPicture ‘ <— This results in a nice thumbnail montage, but alas, no labels.

Any ideas what I’m doing wrong?

Cheers.

- bill k

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 03.02.16 20:33 (Wed, 03 Feb 2016 12:33:34 -0700)
From: Tim Jones
I'm seeing a lot of this type of disparity in some work I'm doing in the video realm. My next effort is to start including my needed ttf/otf fonts in my apps so I can stop trying to guess what the user will have installed - especially on Linux.

Tim

> On Feb 3, 2016, at 5:02 AM, Christian Schmitz <<email address removed>> wrote:
>
>
>>
>> I’ve tried exactly what you’ve done and I’m still not getting any title or label text. I’m now beginning to suspect my computer. Are you testing with Windows, Linux or Mac OS X? Here’s the link to the simplified project, do you see text in the window background?
>
> This works fine on Mac.
>
> On Windows it works once I change font name to Arial.
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 03.02.16 20:40 (Wed, 3 Feb 2016 11:40:50 -0800)
From: William Koperwhats
My understanding is that if you *don’t* specify a font or point size, GM will automatically pick a suitable one for you, so that’s probably the correct thing to do here. That said, can anyone else confirm that this works on Mac OS X (10.11). If it’s just my computer I won’t worry too much. Here’s the link to the project again, and my resulting screenshot after pressing the “Add” button a few times (note the *lack* of any labeling text).

https://dl.dropboxusercontent.com/u/8176813/MontageTest.zip <https://dl.dropboxusercontent.com/u/8176813/MontageTest.zip>
https://www.dropbox.com/s/lkbcpgzmtwgxplg/Untitled.png <https://www.dropbox.com/s/lkbcpgzmtwgxplg/Untitled.png>

Cheers.

- bill k

> On Feb 3, 2016, at 11:33 AM, Tim Jones <tolistim@me.com> wrote:
>
> I'm seeing a lot of this type of disparity in some work I'm doing in the video realm. My next effort is to start including my needed ttf/otf fonts in my apps so I can stop trying to guess what the user will have installed - especially on Linux.
>
> Tim
>
>> On Feb 3, 2016, at 5:02 AM, Christian Schmitz <<email address removed>> wrote:
>>
>>
>>>
>>> I’ve tried exactly what you’ve done and I’m still not getting any title or label text. I’m now beginning to suspect my computer. Are you testing with Windows, Linux or Mac OS X? Here’s the link to the simplified project, do you see text in the window background?
>>
>> This works fine on Mac.
>>
>> On Windows it works once I change font name to Arial.
>>
>> Sincerely
>> Christian
>>
>> --
>> Read our blog about news on our plugins:
>>
>> http://www.mbsplugins.de/
>>
>> _______________________________________________
>> Mbsplugins_monkeybreadsoftware.info mailing list
>> <email address removed>
>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 31.01.16 19:51 (Sun, 31 Jan 2016 19:51:04 +0100)
From: Christian Schmitz

> Am 31.01.2016 um 17:06 schrieb William Koperwhats <<email address removed>>:
>
> Christian,
>
> Are you saying that you are producing a montage image that contains the image labels similar to this one?
>

I just wrote you that the label property works here.
Sorry, I didn't try the montage.

Sincerely
Christian

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 30.01.16 13:08 (Sat, 30 Jan 2016 13:08:06 +0100)
From: Christian Schmitz

>
> What I’m finding is that the “label” for individual images does not carry over when those images are put into an ImageArray.

for me it works with this example code:

Dim StackingFrames As new GM16ImageArrayMBS
Dim StackingMontage As GM16MontageMBS
Dim Thumbs As Picture

'Create the image
dim c as new GM16ColorMBS("white")
dim g as new GM16GeometryMBS(100,100)
dim image as new GM16ImageMBS(g, c)

'Label the image
image.label("Sample label")
System.DebugLog(image.label) ' <— This displays “Sample label"

MsgBox image.label

'Put the current image into the array
StackingFrames.insert(image)
MsgBox StackingFrames.Image(0).label ' <— This shows as Null
StackingFrames.image(0).label("Sample label") ' <— OK, let’s try it this way...
MsgBox StackingFrames.Image(0).label ' <— This *also* shows as Null

'Update the thumbnails
Thumbs = StackingFrames.montageImages(StackingMontage).Image(0).CopyPicture ' <— This results in a nice thumbnail montage, but alas, no labels.



Sincerely
Christian

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 31.01.16 17:06 (Sun, 31 Jan 2016 08:06:08 -0800)
From: William Koperwhats
Christian,

Are you saying that you are producing a montage image that contains the image labels similar to this one?


Here is my GM16MontageMBS class definition:

StackingMontage = New GM16MontageMBS

StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
StackingMontage.fillColor = New GM16ColorMBS(&c000000)
StackingMontage.tile = New GM16GeometryMBS("1x20")
StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
StackingMontage.pointSize = 12
StackingMontage.font = "Helvetica"

This should result in a single column (1x20 image) thumbnail montage of 160x120px thumbnails with a 5px border. The color definitions now work (thanks for fixing that), but I’m not seeing *any* labels. Are you getting back the correct image label in *both* message boxes (the one before and the one after adding the image to the array)? Maybe it has something to do with creating the GMimage from a Xojo picture object rather than the simpler way that you are using.

image = New GM16ImageMBS(Frame)


Cheers.

- bill k

> On Jan 30, 2016, at 4:08 AM, Christian Schmitz <<email address removed>> wrote:
>
>
>>
>> What I’m finding is that the “label” for individual images does not carry over when those images are put into an ImageArray.
>
> for me it works with this example code:
>
>
> Dim StackingFrames As new GM16ImageArrayMBS
> Dim StackingMontage As GM16MontageMBS
> Dim Thumbs As Picture
>
> 'Create the image
> dim c as new GM16ColorMBS("white")
> dim g as new GM16GeometryMBS(100,100)
> dim image as new GM16ImageMBS(g, c)
>
> 'Label the image
> image.label("Sample label")
> System.DebugLog(image.label) ' <— This displays “Sample label"
>
> MsgBox image.label
>
> 'Put the current image into the array
> StackingFrames.insert(image)
> MsgBox StackingFrames.Image(0).label ' <— This shows as Null
> StackingFrames.image(0).label("Sample label") ' <— OK, let’s try it this way...
> MsgBox StackingFrames.Image(0).label ' <— This *also* shows as Null
>
> 'Update the thumbnails
> Thumbs = StackingFrames.montageImages(StackingMontage).Image(0).CopyPicture ' <— This results in a nice thumbnail montage, but alas, no labels.
>
>
>
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 03.02.16 13:02 (Wed, 3 Feb 2016 13:02:34 +0100)
From: Christian Schmitz

>
> I’ve tried exactly what you’ve done and I’m still not getting any title or label text. I’m now beginning to suspect my computer. Are you testing with Windows, Linux or Mac OS X? Here’s the link to the simplified project, do you see text in the window background?

This works fine on Mac.

On Windows it works once I change font name to Arial.

Sincerely
Christian

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 02.02.16 20:15 (Tue, 2 Feb 2016 11:15:43 -0800)
From: William Koperwhats
Here’s what I’m doing:

// build montage
dim StackingMontage as New GM16MontageMBS
StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
StackingMontage.fillColor = New GM16ColorMBS(&c000000)
StackingMontage.tile = New GM16GeometryMBS("1x20")
StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
StackingMontage.font = "Helvetica"
StackingMontage.pointSize = 12
StackingMontage.title = "Title goes here"

// make picture
dim logo as Picture = LogoMBS(500)
dim img as New GM16ImageMBS(logo)

img.label("Sample label")

// Put the current image into the array
Dim StackingFrames As new GM16ImageArrayMBS
StackingFrames.insert(img)

// show result
dim resultImages as GM16ImageArrayMBS = StackingFrames.montageImages(StackingMontage)
dim pic As GM16ImageMBS = resultImages.Image(0)
cvsStackingThumbs.Height = pic.height
cvsStackingThumbs.Width = pic.width
cvsStackingThumbs.Backdrop = pic.CopyPicture

And the screenshot:

https://www.dropbox.com/s/2or9828z3ow7onr/Untitled.mc.png?dl=0

No title, no label, nothing. I have no clue.

- bill k

> On Feb 2, 2016, at 9:16 AM, Christian Schmitz <<email address removed>> wrote:
>
>
>> Am 02.02.2016 um 08:12 schrieb William Koperwhats <<email address removed>>:
>>
>> OK, I can confirm that the GM16Image label is getting set (and remembered) when it get’s placed into the GM16ImageArray, but no labels are getting displayed in the montage. Here is my montage definition:
>
> for me this works:
>
>
> // build montage
> dim StackingMontage as New GM16MontageMBS
> StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
> StackingMontage.fillColor = New GM16ColorMBS(&c000000)
> StackingMontage.tile = New GM16GeometryMBS("1x20")
> StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
> StackingMontage.font = "Helvetica"
> StackingMontage.pointSize = 12
> StackingMontage.title = "Title goes here"
>
> // make picture
> dim logo as Picture = LogoMBS(500)
> dim image as New GM16ImageMBS(logo)
>
> image.label("Sample label")
>
> // Put the current image into the array
> Dim StackingFrames As new GM16ImageArrayMBS
> StackingFrames.insert(image)
>
> // show result
> dim resultImages as GM16ImageArrayMBS = StackingFrames.montageImages(StackingMontage)
> Backdrop = resultImages.Image(0).CopyPicture
>
>
> I see texts for title and label.
>
> Sincerely
> Christian

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 02.02.16 18:16 (Tue, 2 Feb 2016 18:16:00 +0100)
From: Christian Schmitz

> Am 02.02.2016 um 08:12 schrieb William Koperwhats <<email address removed>>:
>
> OK, I can confirm that the GM16Image label is getting set (and remembered) when it get’s placed into the GM16ImageArray, but no labels are getting displayed in the montage. Here is my montage definition:

for me this works:

// build montage
dim StackingMontage as New GM16MontageMBS
StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
StackingMontage.fillColor = New GM16ColorMBS(&c000000)
StackingMontage.tile = New GM16GeometryMBS("1x20")
StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
StackingMontage.font = "Helvetica"
StackingMontage.pointSize = 12
StackingMontage.title = "Title goes here"

// make picture
dim logo as Picture = LogoMBS(500)
dim image as New GM16ImageMBS(logo)

image.label("Sample label")

// Put the current image into the array
Dim StackingFrames As new GM16ImageArrayMBS
StackingFrames.insert(image)

// show result
dim resultImages as GM16ImageArrayMBS = StackingFrames.montageImages(StackingMontage)
Backdrop = resultImages.Image(0).CopyPicture

I see texts for title and label.

Sincerely
Christian

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 03.02.16 08:01 (Tue, 2 Feb 2016 23:01:17 -0800)
From: William Koperwhats
> On Feb 2, 2016, at 9:16 AM, Christian Schmitz <<email address removed>> wrote:
>
> for me this works:
>

Christian,

I’ve tried exactly what you’ve done and I’m still not getting any title or label text. I’m now beginning to suspect my computer. Are you testing with Windows, Linux or Mac OS X? Here’s the link to the simplified project, do you see text in the window background?

https://dl.dropboxusercontent.com/u/8176813/MontageTest.zip

If it works for you, feel free to add it as an example project…

Cheers.

- bill k

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] GraphicsMagick image array labels not showing in Montage
Date: 02.02.16 08:12 (Mon, 1 Feb 2016 23:12:18 -0800)
From: William Koperwhats
OK, I can confirm that the GM16Image label is getting set (and remembered) when it get’s placed into the GM16ImageArray, but no labels are getting displayed in the montage. Here is my montage definition:

StackingMontage = New GM16MontageMBS
StackingMontage.backgroundColor = New GM16ColorMBS(&cE7E7E7)
StackingMontage.fillColor = New GM16ColorMBS(&c000000)
StackingMontage.tile = New GM16GeometryMBS("1x20")
StackingMontage.geometry = New GM16GeometryMBS("160x120+5+5")
StackingMontage.font = "Helvetica"
StackingMontage.pointSize = 12
StackingMontage.title = "Title goes here"

Not even the “title” is getting displayed, but interestingly it looks like the montaged image *does* change slightly in height (by a few pixels) depending on if I comment out the title property line or not, so it looks like *something* is trying to be displayed. Could there be some issue with how the font and pointsize are getting set, similarly to the problems that you found with the colors?

Cheers.

- bill k

> On Jan 31, 2016, at 10:51 AM, Christian Schmitz <<email address removed>> wrote:
>
>
>> Am 31.01.2016 um 17:06 schrieb William Koperwhats <<email address removed>>:
>>
>> Christian,
>>
>> Are you saying that you are producing a montage image that contains the image labels similar to this one?
>>
>
> I just wrote you that the label property works here.
> Sorry, I didn't try the montage.
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info