8.0.3.2 Pictures
I’ve found a strange behaviour (a bug!?) in printing a pictures on report;
it worked on Omnis 4.2, 8.0.1 but not in Omnis 8.0.3.2 and only on a
“Windows 2003 Server”.
The little picture is stored on a table binary-field; on preview the image
is shown in real dimensions (not following the $keepaspectratio attribute)
but printed on a paper it does not exist.
Bye
Rocco
_________________________________
Distinti saluti. Best regards.
Rocco Dr. Ventura
WMS Analist and Software Developer
KUNVI srl – Experiences Holding – www.kunvi.it
Email: r.ventura@kunvi.it – Mobile: +39 348 5186051
—–Messaggio originale—–
Da: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] Per conto
di Kelly Burgess
Inviato: martedì 13 giugno 2017 02:20
A: OmnisList <omnisdev-en@lists.omnis-dev.com>
Oggetto: Re: 8.0.3.2 Pictures
Hi Mike,
> 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.
www.kellyb.com/privateTemp/image8.lbs.zip
The basics are just:
ReadBinFile(path,binField) Returns size If size > 0
Calculate picField as binField
Do $cinst.$objs.dfPicture.$rawpictformat.$assign(pictformat(picField))
Redraw dfPicture
End if
That works with JPG and PNG at least.
Kelly
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
—
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
www.avast.com/antivirus
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com