but can you just try?
Same problem on Intel, no problem on M CPU.
dim f as FolderItem
if PictureFolder <> nil then
f = PictureFolder.Child(ArtikelID + â.pngâ)if MyPic <> nil And f <> Nil then
var NewPic As New Picture(MyPic.Width, MyPic.Height, 32)
NewPic.Graphics.DrawPicture(NewPic, 0, 0)
NewPic.Save(f, Picture.Formats.PNG)
end ifelse
MsgBox âPictureFolder not definedâ
end if
NewPic values:
Ok. This rules out any inherent problem with âmypicâ as a source for the save.
I donât see that youâve attached the problematic image anywhere here. Or is it all images? Some source formats may be supported for input, but not conversion/output by the framework depending upon architecture or OS version, possibly. I think (correct me if Iâm wrong), PDF is this way.
I could not be a problem with the image. Any picture or screenshot is working on Apple M CPU and not on Intel. Also I have run the application as an Intel binary, but I got the same problem.
Good info to have. Thanks. Looks like your best bet is to open a case with Xojo, point them to this thread, attach the non-MBS example project and a sample image (because theyâll ask), and wait to see if they can reproduce.
Now a test with Einhugur Plugin:
dim f as FolderItem
if PictureFolder <> nil then
f = PictureFolder.Child(ArtikelID + â.pngâ)if MyPic <> nil And f <> Nil then
// var NewPic As New Picture(MyPic.Width, MyPic.Height, 32)
// NewPic.Graphics.DrawPicture(NewPic, 0, 0)
// NewPic.Save(f, Picture.Formats.PNG)
// MyPic.Save(f, Picture.Formats.TIFF)
// Picture.SaveAsPNG)var PNGex as new RawPngExporter // pngex.CompressionLevel PNGex.SaveToFile(RawBitmapConverter.FromPicture(MyPic),f) if PNGex.LastError <> 0 then MessageBox PNGex.ErrorMessage return end ifend if
else
MsgBox âPictureFolder not definedâ
end if
No problem on Intel CPU.
Can you confirm that your client has problems with Intel and Mx computers but you only with Intel?
Yes. Problem exists only on Intel. But I think the problem must be a Modul or a Plugin that I use on this application.
If I create a new project, add a Canvas, add the same code, this application is running on Intel CPU without any problem.
Now I remove any plugin and module from the project to find out what the problem is. I will write the solution her, after I found the problem.
Thank you to all for your help.
In the image properties, Graphics is Nil:
This is your image (Copy / Paste from/to the Forum software): see far aboveâŠ
The problem was a not existing folder. Normally it was created at the first start. I donât know why it was created on M CPU and not on Intel.
Now I have added a new method that does a double check. If the folder is not exiting, it would be created, if the user drag a picture into the application.
Then the message is clearly wrong: âThis format is not supportedâ when the folder doesnât exist. Still worth a fix from Xojo, IMO.


