> a method to import a picture (.jpeg or .png) and show it on a report field, presumably of type picture
> The binary data is imported using FileOps
I’d use ReadBinFile rather than FileOps to load the image. If you used theFileOps.$readentirefile function, that’d be your problem – that function adds a 12-byte header to the file data to accommodate 2-fork Mac files, their type, creator and their second fork offset.
I just converted a little test library from Studio 4.3.1 to 8.0.3 and it’s still working properly. No report class involved here, but the code should be the same as loading into a picture field on a window.
The basics are just:
ReadBinFile(path,binField) Returns size
If size > 0
Calculate picField as binField
That works with JPG and PNG at least.
Manage your list subscriptions at lists.omnis-dev.com