Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EZTwain problem with JPG

Status
Not open for further replies.

DarrenWard

IS-IT--Management
Feb 15, 2002
217
GB
I am using the above control and it is working but I cannot get it to create .JPG files only BitMap.

I have the .DLL required and when I issue a Twain_IsJPegAvailable it returns 1 (true).

If I issue the TWAIN_SetSaveFormat to 4 it acts as if it has created the file but it does not write anything to disk, even if I give it a null filename in the save routine it come up with the Save As dialogue box as documented but when you enter a filename it does not create the file, no error messages are being returned from the either the ocx or the dll.

Any ideas?

Dazz

GuiltyMaggot - The best rock band in the world!
 
Dazz,

Forgive me if this is obvious, but are you actually calling TWAIN_WriteNativeToFilename()? The TWAIN_SetSaveFormat() function doesn't actually save anything, it merely specifies the format for other functions.

Mike


Mike Lewis
Edinburgh, Scotland
 
Hiya Mike,

Yeah I am;
TWAIN_SetSaveFormat(4)
PicHnwd = TWAIN_AcquireNative(0, 0)
TWAIN_WriteNativeToFilename(PicHwnd, "File.JPG")

but;
TWAIN_SetSaveFormat(2)
PicHnwd = TWAIN_AcquireNative(0, 0)
TWAIN_WriteNativeToFilename(PicHwnd, "File.BMP")

Works fine.


GuiltyMaggot - The best rock band in the world!
 
Mike,

It returns 1 as does the Twain_IsJPegAvailable call.

I have downloaded a fresh copy of JPeg DLL that is required with no joy, I will try an installation on another PC and see what happens, again thanks for your help so far.

Dazz

GuiltyMaggot - The best rock band in the world!
 
Dazz,

You might also try emailing Spike Maclarty, who is the author of EZTWAIN. I have found him very helpful. His email address is probably in the documentation somewhere, or on his web site.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top