Mojave and Transparent images

Xojo 2017R3 64bit app
Customer has upgraded to Mojave and reports that images that were previously working as ‘transparent’ now show up as black blobs.
I still use mask method rather than alpha channel.
Has anyone else seen this under Mojave?

Have you tried a newer version of Xojo?

What Greg asked and consider adding an entry to your application plist that says your app is not dark mode compatible yet so you aren’t surprised by these sort of things until you have a chance to do the updates that are required to properly support dark mode.

Something like mentioned in this thread
https://forum.xojo.com/conversation/post/399869

I have now sent a version compiled in Xojo 2018, same issue.
And turned off dark mode. Same issue.

The release notes for all non-beta versions of Xojo don’t mention anything about catering for Mojave, to be fair.
Seems Apple is incapable of releasing an OS update without breaking our apps in some way.

‘your app is not dark mode compatible yet so you aren’t surprised by these sort of things’
I was telling people ‘Mojave is in beta, and issues seen in betas may not be present in the release’.
I went on holiday for a couple of weeks, came home and they had released it. :frowning:

Do you see the issue yourself? Do you have screenshots? Do you have a link to a compiled app? Have you tried to reproduce the issue in a simple example? Do you have code to share?

For me the AppleScript permissions are running amok in Mojave. But the drawing doesn’t look much different than before.

Literally just back from hols, so I haven’t assembled any simple examples yet.
My own machines are running High Sierra without issue.
I’m installing the Mojave release now.

Just wondered if anyone else was reporting the same kind of thing.
When I have a repeatable bit of code, I’ll 'find another way’ to do what I have been doing without problems for many years.
And then update this post with what I did - almost certainly it will now involve refactoring away from
‘image with a mask’ to
‘image using alpha channel’

I’m reluctantly resigned to this usual ‘yearly workaround’ work.
Tabbed windows, vertical scrollbars, app translocation, dark mode , PDF changes - that’s just in the last few years, and the list goes on.
Windows has its problems, but I cannot recall the last time a new build of Windows broke my apps.

I had the same problem.
If you are using MBS plugins, make sure you are using the latest. It solved the issue for me.

Btw the issue has nothing to do with darkmode.

Grin… Don’t go into holiday when a major macOS release is imminent. And yes, it’s totally annoying.

I’ve just rechecked my current app in dark mode with a different accent color. But I don’t see anything. Or Dark Mode is too dark.

Quoted from first post, I saw this issue with black blobs, too, using Mac OS X 10.12. So I think it is the mask method issueing when using the conventional mask method, because, when I switched the graphics to Image Set and put edited graphics into the slots, the black blob is gone.

Independent from macOS version.

Interesting.
My images are generated ‘on the fly’ to represent placeable items that are dragged about, so I don’t have ‘slots’ to play with.

(One thing that might hamper my fix is that Im using an older Xojo on Windows for many many reasons.
Imagesets arent compatible over there. )

Pretty sure I dont use them to generate these images, but its worth a try.

I read this in the AppleScript list:

I had heard before the release of 10.14 that AppleScript documentation had been moved to Legacy. Not sure if that helps.

[quote=408288:@Jeff Tullin]My images are generated ‘on the fly’ to represent placeable items that are dragged about, so I don’t have ‘slots’ to play with.

[/quote]
Could you show us the code you are using to create the images?

Yes. May be a day or two tho.
‘Real job’ getting in the way. :slight_smile:

From memory I -

create a new picture (x,y,32)
Then add a mask of the same size
Fill the mask with white.
Draw things on the picture in color.
Draw the same things on the mask but in white.
Set the transparent mode.
.Drawpicture this image onto another pre-drawn image
Then display the resulting combined image in a canvas.

If I am not mistaken, you need to leave out ,32

Yes I also reported this problem recently.
Greg, here is a link you can view <https://xojo.com/issue/53391>

Oh… Good. Feedback doesnt work for me.
Does

work around the issue?

OK. Repeatable.

Failing method:

[code]p = new picture (wid,hei,32)
p.graphics.forecolor = &cffffff
p.fillrect 0,0,wid,hei
p.transparent = 1 //white is transparent

//draw stuff
otherpic.drawpicture p, x,y[/code]

Mojave compatible:

p = new picture (wid,hei) //draw stuff otherpic.drawpicture p, x,y

Now to find all instances of stuff done like that.

I can’t seem to find the documentation on what the difference is when you create a picture passing the bit depth. The default bit depth is 32, but if you manually pass it to the constructor, you get a different type of picture. The differences is/are documented somewhere, I just don’t recall where.

The reason I mention this is that passing the bit depth as 32 was likely a workaround for some other thing you were doing; as there’s no other need to pass the 32. You should thoroughly test for undesirable results from this change.

Not quite. A workaround for some other feature that was taken away.
Its legacy code which has been working fine for many years, dating from before you could omit that parameter.
At one time I was happily using bitmaps with a depth of 2 , 8 or 16 for some purposes.
Low memory.
Slowly but surely Apple and probably Xojo got bored with trying to keep that kind of code going and just deprecated it, so the bit depth went up to 32 as the only thing they were prepared to support.