For some reason, the heic sample file I downloaded was not working.
But I got two files from you and both of them working well with all the imaging functions of FWH, if FreeImage.dll is available.
Please try this sample program, which shows how to convert heic to jpg and to display them with XIMAGE.
Code: Select all
#include "fivewin.ch"
function Main()
local cHeic, cJpeg, oDlg, oImageH, oImageJ
local x
cHeic := "image-30-06-20-08-07-9.heic"
cJpeg := cFileSetExt( cHeic, "jpg" )
if FW_SaveImage( cHeic, cJpeg, 50 )
? cHeic + CRLF + " converted to " + CRLF + cJpeg
else
? "Conversion failed"
endif
DEFINE DIALOG oDlg SIZE 860,400 PIXEL TRUEPIXEL TITLE ;
FWVERSION + " : Conversion of Images HEIC to JPG"
@ 20, 20 XIMAGE oImageH FILE cHeic SIZE 400,300 OF oDlg
@ 20,440 XIMAGE oImageJ FILE cJpeg SIZE 400,300 OF oDlg
@ 350, 20 SAY cHeic SIZE 400,20 PIXEL OF oDlg CENTER
@ 350,440 SAY cJpeg SIZE 400,20 PIXEL OF oDlg CENTER
ACTIVATE DIALOG oDlg CENTERED
return nil
Use FW_SaveImage( cHeicfile, cJpegfile, nJpgQuality ) for silent conversion.
You can convert the images in batches also.
It is necessary that you need to have freeimage.dll in the exe path for (1) conversion and (2) directly read heic files andd display them
Once converted to jpg, you do not need freeimage.dll to read or display jpg files.