Viewing JPG

In this category you can exchange your programming questions and solutions.
Trebor55
Posts: 5
Joined: Mon May 20, 2013 6:45 pm

Viewing JPG

Post: # 1072Post Trebor55
Mon May 20, 2013 8:19 pm

Hello,
How to view JPG images
thank you

Angel
Posts: 87
Joined: Sat Nov 19, 2011 9:34 am

Viewing JPG

Post: # 1073Post Angel
Thu Jul 11, 2013 7:44 am

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

Trebor55
Posts: 5
Joined: Mon May 20, 2013 6:45 pm

Viewing JPG

Post: # 1074Post Trebor55
Wed Aug 28, 2013 9:30 pm

Hello Angel,
I do not find jpgDll.dll flawless.
Could you put a link on a correct jpgDll.dll
thank you

cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Viewing JPG

Post: # 1075Post cvirus
Thu Aug 29, 2013 8:01 am

http://www.dll-files.com/dllindex/dll-files.shtml?jpegdll

Angel
Posts: 87
Joined: Sat Nov 19, 2011 9:34 am

Viewing JPG

Post: # 1076Post Angel
Thu Aug 29, 2013 1:56 pm

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.

Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

Viewing JPG

Post: # 1077Post Darren
Wed Nov 20, 2013 10:18 am

The above code does not work!

Can somebody post the actual project source code.

Regards

Darren

Angel
Posts: 87
Joined: Sat Nov 19, 2011 9:34 am

Viewing JPG

Post: # 1078Post Angel
Wed Nov 20, 2013 5:51 pm

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.

Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

Viewing JPG

Post: # 1079Post Darren
Thu Nov 21, 2013 7:34 am

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

Angel
Posts: 87
Joined: Sat Nov 19, 2011 9:34 am

Viewing JPG

Post: # 1080Post Angel
Thu Nov 21, 2013 2:42 pm

Yes, I have sent you an email.
Greetings.

Aurelz
Posts: 15
Joined: Tue Apr 24, 2012 7:44 am

Viewing JPG

Post: # 1081Post Aurelz
Fri Nov 22, 2013 7:54 am

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.

Post Reply