Project created with Xojo 20156r1, now running in Xojo 21r2.1
I got an unsupported format exception for both lines:
Original line (who works on 2015r1)
Banner_Pct.Save(BaPict_FI, Picture.SaveAsPNG)
Modified line:
Banner_Pct.Save(BaPict_FI, Picture.Formats.PNG)
Error Number: 0
Message: This format is not supported
Reason: This format is not supported
Xojo 21r2.1 / Monterey / MacBook Pro m1.
Ideas ?
After reading one more time the LR:
If Picture.IsExportFormatSupported(Picture.Formats.PNG) Then
Banner_Pct.Save(BaPict_FI, Picture.Formats.PNG)
End If
And I get the Exception Error…
The FolderItem (BaPict_FI) and the Picture (Banner_Pct) are not Nil.
BTW: What is the Syntax ?
Picture.Save or Banner_Pct.Save ? I assumed the second, but…
I found the error (but not why):
The original code was:
BaPict_FI = Source_FI.Child(“images/” + Banner)`
But the image name was changed (prefixed images/)
New code:
BaPict_FI = Source_FI.Child("images")
BaPict_FI = BaPict_FI.Child(Banner)
When I reverted to the old code, no more error !