Link to home
Start Free TrialLog in
Avatar of learningasigo1234
learningasigo1234

asked on

WIA: Default format to jpg?

Hi, I am using a program that relies on WIA to scan images.  Unfortunately, this software (a patient record system called VistA) requires the scanned format to jpg, though the WIA driver is canning as a bitmap instead.  

Is there a way of telling WIA to pull the image as a jpg as a default?  (I am using WIA 2.0).

Thanks!

Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Most imaging/scanning software allows you to control the WIA parameters. For example, here's the WIA scanning dialog from a popular imaging package that I use (PaperPort):

User generated image
Note that the Output tab allows you to select a file type. In this case, as you can see, I picked JPG. Your package will, of course, be different, but somewhere in there it should allow you to set scanning parameters, such as mode (B&W/color/grayscale), resolution (DPI), size (letter/legal/A4/B5, et al.), and the output file type. Regards, Joe
Btw, I gave the answer above because I assume that you'll need to control the file type via your patient record system, VistA. If you were writing your own app with WIA, then this EE thread would help:
https://www.experts-exchange.com/questions/22726076/WIA-Transfer-method-transfers-files-into-BMP-not-JPG.html
Regards, Joe
Avatar of learningasigo1234
learningasigo1234

ASKER

Hi Joe,

Thanks very much for your reply.  Unfortunately, this software doesn't provide the option to select image type -- basically, it asks what I want to scan and gives me the option to scan (see the file "scan 1.tiff").  It then carries out the scan and is meant to preview the image in the image window (see "image 2.tiff").  

This works fine on my PC (using Windows XP and an HP PSC 1410 all-in-one scanner), but is *not* working on a colleague's set.  Instead of showing the preview of the image after scanning, it presents a message box that says   "JPEG error #53" (see jpeg error.png).  My understanding is that this error indicates that the file is not a JPEG (and the preview window is expecting a JPG), and is most likely a BMP file.  (The developers of the patient record software has indicated that its viewer only takes JPG files at the moment, and it's something they'll have to explore further)

I'm trying to work out whether there is a hardware-level setting in the scanner (or perhaps something related to WIA in the Windows registry?) that might be causing it to upload as a BMP file rather than a JPG--yet, on my set, all works without a problem.  How does an image program know what format to use when it scans an image?


Thank you for your thoughts and help!

Tony

scan-1.tiff
image-2.tiff
JPEG-Error.png
Tony,

What is on the File menu in the Get Image From Device window? To answer your question on how a program knows what format to use when it scans an image, it's usually hanging off the File menu or some other menu. For example, here's the File menu from a very popular (and free!) imaging program called IrfanView:

User generated image
If you select the Acquire/Batch Scanning item off the File menu, you get this:

User generated image
As you can see, this is where you select the output (Save as) file type – in this case, JPG. Regards, Joe
Hi Joe,

Unfortunately mine does not do this -- it seems to use the Windows Camera and Scanning Wizard, but skips the prompt that asks for the file format/etc.  I know that the software itself is *expecting* a JPG to be received, but it's not clear that it specifies that a scanner 'send' the image as a JPG.  

My colleague working on the set that's causing the problem has found that the file is coming across as a PNG and *not* a BMP as I initially wrote.

How does a scanner know what format to send an image back to the system, if that format is not specified? Is there a "scanner BIOS" that specifies a default type??

Tony,
Your <image-2> and <JPEG-error> screen shots show a <Get Image From Device> dialog box that has a File menu and an Action menu. What are the choices on those two menus?
Tony,
Another question: You say that it is working on your XP machine with an HP PSC 1410 "but is *not* working on a colleague's set". What operating system and scanner is your colleague using? Thanks, Joe
Hi Joe,

I've attached screen shots showing the preview window with both the File and Action menu options.  There is one option called "Import Photo", but it simply presents the scan function (see attached).

I am running the software on Windows XP using WIA 2.0, using the driver on Microsoft's web site:
http://www.microsoft.com/download/en/details.aspx%3Fdisplaylang%3Den%26id%3D18287&usg=AFQjCNFHCQsg8Zql0O5YU1_FAhr4wj694w

I am using an HP PSC1410 scanner -- my colleague is also using an HP flatbed scanner, but I do not have the type onhand (but can get it tomorrow).

I just thought of one potential factor that might be causing the problem: When my colleague tried to copy the WIA dll (wiaaut.dll) into his Windows\System32 folder (as instructed in the readme.txt file--see attached), he found that there was already a wiautt.dll file there.

He had tried to use the camera function using this file, and it came up with an error along the lines of "no WIA devices found".  

When he copied the XP version on top of that file and registered (as advised in the readme.txt file), it the scanning functionality worked -- except for the error when the scanned image is returned to the viewing window.

Is it possible that this might have contributed to the problem?  Does the wiautt.dll file that's in the Windows 7 System32 folder have to be manually registered (like the Windows XP driver), even though it's already in the folder?

File-Menu-prompts.tiff
Action-menu-prompts.tiff
Action-menu--Import-option.tiff
README.txt
Tony,

I don't know where those instructions came from (a digital camera?), but the user should not have to copy DLL files like that. I've installed many, many scanners over lots and lots of years and don't recollect ever doing that. All scanner manufacturers I've dealt with, including HP, provide a setup program that installs software (typically drivers and scanning/imaging apps). HP has a very good website for downloads. For example, here's the link for your scanner, the HP PSC 1410:
http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?cc=us&dlc=en&lc=en&product=441115&

It contains software, drivers, and manuals. I suggest getting the model number of your colleague's HP flatbed scanner and downloading the latest-and-greatest drivers, software, and manuals from the HP site (be sure to pick the right software for his OS version). Run through a standard install/setup (if there *is* an issue with <wiaaut.dll>, this proper installation should fix it).

One other point: find out from the VistA folks if their system supports TWAIN. HP is almost certain to have a TWAIN driver for your colleague's scanner and if VistA supports TWAIN, that will give us another avenue.

Btw, on your earlier question about a "scanner BIOS", I've never heard it referred to that way, but, yes, there *are* default settings in scanners that may specify default file types. For example, I have a scanner that lets you select TIFF or PDF for B&W, and JPEG or PDF for Color (and, of course, there's a default for each). Regards, Joe
Hi Joe,

The instructions I attached came from the driver file on the Microsoft web site -- I didn't have the full scanner drivers installed on my set (which must have been why the wiaaut.dll file wasn't there), but my colleagues did have theirs installed.  (That must explain why they had a version of the file in Windows 7).

Your point on the scanner BIOS will, I believe, answer my question (thank you!).  Do you know how to access those 'BIOS' settings on, say, an HP scanner?  Where can I find more information about this?
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks VERY much, Joe.  This gives me enough to go on to solve my problem.