Page 1 of 2
Viewing JPG
Posted: Mon May 20, 2013 8:19 pm
by Trebor55
Hello,
How to view JPG images
thank you
Viewing JPG
Posted: Thu Jul 11, 2013 7:44 am
by Angel
Download the free jpgDll.dll and place it in the folder where you run the following code:
`code
Dim loadlib as long
loadLib=loadLibrary(Exepath+"jpgdll.dll")
if loadlib>0 then
Declare init_jpeg1 AS "init_jpeg1" of "jpgdll.dll"
result as long
end declare
Declare showjpg1 AS "showjpg1" of "jpgdll.dll"
filename as string
hWnd as LONG
left as long
top as long
result as long
end declare
else
showmessage "cannot load jpgDll.dll"
end if
Object frmForm as Form
Caption="Form"
Width=640
Height=480
Center
`Other objects
Object btnButton as Button
Tag=0
Top=10
left=10
`Width=100
`Height=30
Caption="Button1"
Hint="This is a button"
ShowHint=True
`Cursor=crHandPoint
`Bitmap.loadFromFile("bitmap.bmp")
OnClick=btnButton_OnClick
End Object
`End other objects
`Onshow=frmForm_Onshow
`Onclose=frmForm_Onclose
End Object
frmForm.Showmodal
Sub btnButton_OnClick
dim pathfilename as string
dim hwindow as long
pathfilename=exepath+"yourimage.jpg"
hWindow=frmform.hwnd
call loadJpg(pathfilename,hwindow,100,10)
End Sub
function loadJpg(filename as string,hwnd as long, left as integer, top as integer) as long
init_jpeg1.execute
showjpg1.filename=filename
showjpg1.hwnd=hwnd
showjpg1.left= left
showjpg1.top=top
showjpg1.execute
End function
Viewing JPG
Posted: Wed Aug 28, 2013 9:30 pm
by Trebor55
Hello Angel,
I do not find jpgDll.dll flawless.
Could you put a link on a correct jpgDll.dll
thank you
Viewing JPG
Posted: Thu Aug 29, 2013 8:01 am
by cvirus
http://www.dll-files.com/dllindex/dll-files.shtml?jpegdll
Viewing JPG
Posted: Thu Aug 29, 2013 1:56 pm
by Angel
You can download the dll in this link:
http://heliso.tripod.com/programm/jpeg/jpeg.htm
Press download.
However, there are some limitations with fnx. Only the form object can display the jpg file. If the form is minimized or loses focus, the image disappears.
Viewing JPG
Posted: Wed Nov 20, 2013 10:18 am
by Darren
The above code does not work!
Can somebody post the actual project source code.
Regards
Darren
Viewing JPG
Posted: Wed Nov 20, 2013 5:51 pm
by Angel
I put that code properly checked, and I can assure you it works on my computer, within the limitations I have said. You may not have the correct dll.
Viewing JPG
Posted: Thu Nov 21, 2013 7:34 am
by Darren
Angel,
Many thanks for your reply!!!!
I have downloaded the dll from http://www.dll-files.com/dllindex/dll-files.shtml?jpegdll and it does not work.
The other website http://heliso.tripod.com/programm/jpeg/jpeg.htm
The download does not unzip.
If possible, can you please email me your copy of the dll file to
dsmith@nfm.net
MANY THANKS FOR YOUR HELP!!!!
Darren
Viewing JPG
Posted: Thu Nov 21, 2013 2:42 pm
by Angel
Yes, I have sent you an email.
Greetings.
Viewing JPG
Posted: Fri Nov 22, 2013 7:54 am
by Aurelz
There is no need to use any kind of jpeg.dll
if FNXBasic can use win api functions and load jpg image
into window DC.
If you whish persistent image you need double buffered
window.