Picture.Save - This format is not supported

I have an Application that runs since 12 years (last update on December 2025) without any problem. Now I have a new customer with macOS 26.2 and he gets this error from my application when the PictureSave is executed. The customer has tree different Mac computer. Two withFileVault activated and one without FileVault. He gets the same error on any machine.

0 This format is not supported

RuntimeRaiseException

_Z27RaiseExceptionClassWMessageRK13ClassDeclBase6stringl

_ZN12MediaIOCocoa11SavePictureEP13FolderItemImpP13PictureObject14ePictureFormati

Picture.Save%%oo

If I run my application on macOS 15 and macOS 26.2 I could not see this problem. The application save every Picture when “Picture.Save” is executed.

Any idea ?

Hi Horst,

Could you provide the code that you are using to save the pictures. That will help people figure out what’s going wrong.

Better, can you provide a small sample showing the issue? Zip it and post here.

Public Sub SaveUserPicture(MyPic as picture)
  dim f as FolderItem
  
  if PictureFolder <> nil then
    f = PictureFolder.Child(ItemID + ".png")
    
    if MyPic <> nil then
      MyPic.Save(f, Picture.SaveAsPNG)
    end if
  else
    MsgBox "PictureFolder not defined"
  end if
End Sub

PictureFolder is a global folder which is set when the application start.

How are the pictures being created?

On a Canvas event Drop Object:

If Obj.PictureAvailable then

dim MyPicture as Picture
dim p, pout As Picture

me.Backdrop = nil // NoPicture
MyPicture = Obj.Picture

pout = MyPicture
p = New Picture(MyPicture.Width, MyPicture.Height, 32)
PictureFaktor = MyPicture.Width / MyPicture.Height

if PictureFaktor < 1 then
p.graphics.drawPicture MyPicture,0,0,me.WidthPictureFaktor,me.Height,0,0,MyPicture.Width,MyPicture.Height
end if
if PictureFaktor > 1 then
p.graphics.drawPicture MyPicture,0,0,me.Width,me.Height,0,0,MyPicture.Width,MyPicture.Height
PictureFaktor
end if
if PictureFaktor = 1 then
p.graphics.drawPicture MyPicture,0,0,me.Width,me.Height,0,0,MyPicture.Width,MyPicture.Height
end if

SaveUserPicture(pout)

Is it plausible that the source format isn’t supported? macOS does a lot of great things for us, so it may be able to show you visually, but trying to convert the format could be problematic. Formats like webp can be annoying like that.

(Just throwing out ideas, not a diagnosis.)

No, the file format could not be the problem. I have send a picture that is working on my Mac to the customer and the problem is the same.

I think the most important bit there is missing

As in what SaveUserPicture is doing.

go back 27 minutes on the top. There is SaveUserPicture

Is this an Intel, ARM, or Universal app?

What would happen if it’s an ARM app, but Rosetta 2 isn’t installed? Could that trigger something weird like this?

Universal app.

Well Png codec is for sure always present.

I would try to supply the user with pure arm64 app no Universal. Though universal should only use the arm64 part but who knows ?

(what I am getting at here is that possible difference is not everyone install Rosetta, I for one have a machine with no Rosetta)

Unfortunately, that’s not an option because it’s an app for the Apple App Store and many users still have an Intel CPU.

On my own systems it runs on Intel and M1 CPU without any problem.

Is there Trial version or something of it then on the App store and is it easy to test this scenario ?

This is the PictureTest project which use the same SaveUserPicture code.

Picture Test.xojo_binary_project.zip (477.4 KB)

And what Xojo version did you compile the one you have on the App store that the user had trouble with ?

Your user was able to test that and confirm that the error is present?

1 Like

The Example project is doing some mbs things. So cannot test.

I am waiting for the user’s response.

This is the project without MBS.

Picture Test No MBS.xojo_binary_project.zip (464.0 KB)