[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1515
  • Last Modified:

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!

0
learningasigo1234
Asked:
learningasigo1234
  • 7
  • 5
1 Solution
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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):

WIA scanning dialog
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
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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:
http://www.experts-exchange.com/Web_Development/Digital_Camera_Software/Acquisition/Q_22726076.html
Regards, Joe
0
 
learningasigo1234Author Commented:
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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:

IrfanView-File-menu
If you select the Acquire/Batch Scanning item off the File menu, you get this:

IrfanView-Acquire-menu
As you can see, this is where you select the output (Save as) file type – in this case, JPG. Regards, Joe
0
 
learningasigo1234Author Commented:
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??

0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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?
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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
0
 
learningasigo1234Author Commented:
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
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
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
0
 
learningasigo1234Author Commented:
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?
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
Scanners vary in how they let users change the settings. You can find more info in the HP manuals, which are available for download at their website. I sent you a link earlier for your scanner (PSC 1410). Find out what model your colleague has, search the HP website for it, and download the manual(s). While you're at it, I think it's always a good idea to have the latest drivers installed, so download those, too, and install the drivers on your colleague's machine. Btw, I think this is the first time you've mentioned that your colleague is on W7. Be prepared for a possible problem – some older scanners don't have drivers for W7, especially 64-bit W7.
0
 
learningasigo1234Author Commented:
Thanks VERY much, Joe.  This gives me enough to go on to solve my problem.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now