Jpeg error 53 when using TMG-CPRS scanning in Windows 7

124 views
Skip to first unread message

Tony Perry

unread,
Oct 23, 2011, 11:48:38 AM10/23/11
to hard...@googlegroups.com, Nasir Mahmood
Hi, 

When using the TMG-CPRS scanning tool, we're getting a strange error "JPEG error #53" that appears under Windows 7 but not when doing the exact same thing in Windows XP.  The error occurs just after an image is scanned and before it is due to appear in the image window, as shown in the screenshot below.

To reach this stage, we:
1) Click on the Notes tab and then select Action->New Progress Note
2) We then select the type of progress note (in our case, a custom type called "Scanned Outpatient Document"
3) After clicking on the body of the new progress note, we then click on the Images tab and then click on "Upload Images"
4) In the window that appears, we click on "Camera"
5) In the window that follows, we click on "Take/Import Picture" and then follow the instructions to scan the image

It is after the image is scanned that that the "JPEG error #53" occurs, and no image appears in the image window (which means no image can be uploaded onto the VistA server).  I did some research and it looks like this error is related to a corrupted file, or some similar difficulty in reading the JPG.

When I repeat this process in Windows XP (after installing the WIA driver, as noted below), all works without a problem.

One potential issue, we think, is the WIA module.  Windows 7 already has the driver file (wiaaut.dll) installed, whereas (on my set at least) Windows XP did not.  However, it would initially say something like "No WIA devices found" if we click on the "Take/Import Picture" button.  

To overcome this, we overwrote the driver with the driver posted on Microsoft's web site:

It does actually scan now, but, as noted, it returns an error upon completion in Windows 7 with the driver from the above link.

I wonder whether this driver, designed for Windows XP, is somehow not compatible with Windows 7?  Have any other users had similar problems when using TMG-CPRS scanning in Windows 7?

Any thoughts would be most appreciated!

Best regards,

Tony



kdt...@gmail.com

unread,
Oct 23, 2011, 10:25:42 PM10/23/11
to Hardhats
Tony,

It seems like we ran into a problem like this when we were working
with the hospital in Thailand. Their problem was that TMG-CPRS asks
the WIA module for a *.jpg file. Then the image acquisition occurs,
and WIA returns a "all's good" message. This was with their scanner.
But in fact, the scanner was returning .BMP formatted files, and then
TMG-CPRS choked when it tried to use a BMP image as a JPG file.

Possible solutions:
-- See if you imaging device is returning JPG files.
-- Try downloading the latest TMG-CPRS from LaunchPad to see if we
included that fix with the latest version.
-- As a last resort, try saving the images to file, and then select
the image as a file (as compared to getting it directly from the
device.) When you select the file directly, TMG-CPRS is much more
flexible. (It will even accept sound or movie files I think).

We also have had problems with the change from XP --> Win 7. For
example, I can't get images directly from a web cam anymore. I have
to use a separate program to save a snapshot as a file to the
filesystem, and then ask TMG-CPRS to grab the image. One of these
days I will get around to trying to figure out what has changed......

Kevin

On Oct 23, 11:48 am, Tony Perry <tony.j.pe...@googlemail.com> wrote:
> Hi,
>
> When using the TMG-CPRS scanning tool, we're getting a strange error "JPEG error #53" that appears under Windows 7 but not when doing the exact same thing in Windows XP.  The error occurs just after an image is scanned and before it is due to appear in the image window, as shown in the screenshot below.
>
> To reach this stage, we:
> 1) Click on the Notes tab and then select Action->New Progress Note
> 2) We then select the type of progress note (in our case, a custom type called "Scanned Outpatient Document"
> 3) After clicking on the body of the new progress note, we then click on the Images tab and then click on "Upload Images"
> 4) In the window that appears, we click on "Camera"
> 5) In the window that follows, we click on "Take/Import Picture" and then follow the instructions to scan the image
>
> It is after the image is scanned that that the "JPEG error #53" occurs, and no image appears in the image window (which means no image can be uploaded onto the VistA server).  I did some research and it looks like this error is related to a corrupted file, or some similar difficulty in reading the JPG.
>
> When I repeat this process in Windows XP (after installing the WIA driver, as noted below), all works without a problem.
>
> One potential issue, we think, is the WIA module.  Windows 7 already has the driver file (wiaaut.dll) installed, whereas (on my set at least) Windows XP did not.  However, it would initially say something like "No WIA devices found" if we click on the "Take/Import Picture" button.  
>
> To overcome this, we overwrote the driver with the driver posted on Microsoft's web site:http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1...

tony2468

unread,
Oct 27, 2011, 5:34:20 PM10/27/11
to Hardhats
Hi Kevin,

Thanks for your feedback and apologies for taking longer to reply than
I had hoped to.

My sense is that you're right -- the image file is being pulled across
as a BMP file rather than a JPG for some reason. (On my set, however,
the image is uploaded without difficulty -- I don't know if this is
related to a difference in Windows 7/XP (I am using XP, whereas the
hospital in Pakistan uses Windows 7), or if it's related to my scanner
(I am using a HP PSC 1410 all-in-one printer/scanner/copier, while the
hospital in Pakistan uses another HP model).

I did some further digging, and it sounds like there is a protocol
code (e.g. in Visual Basic, and presumably Delphi) that's used to tell
the WIA what kind of image to pull across. Is there an element of
Delphi code or the like that is used for accessing the WIA function
via TMG-CPRS? (I just wonder whether there is a setting that hasn't
been set, which leaves the PC to determine whether the format being
pulled over is BMP or JPG (rather than telling WIA to pull across a
JPG).

We are using version 11.4 of TMG-CPRS (which I gather is the latest
version?)

I look forward to your thoughts!

Tony





On Oct 24, 3:25 am, "kdt...@gmail.com" <kdt...@gmail.com> wrote:
> Tony,
>
> It seems like we ran into a problem like this when we were working
> with the hospital in Thailand.  Their problem was that TMG-CPRS asks
> theWIAmodule for a *.jpg file.  Then the image acquisition occurs,
> andWIAreturns a "all's good" message.  This was with their scanner.
> > When I repeat this process in Windows XP (after installing theWIAdriver, as noted below), all works without a problem.
>
> > One potential issue, we think, is theWIAmodule.  Windows 7 already has the driver file (wiaaut.dll) installed, whereas (on my set at least) Windows XP did not.  However, it would initially say something like "NoWIAdevices found" if we click on the "Take/Import Picture" button.  

tony2468

unread,
Oct 28, 2011, 6:25:15 PM10/28/11
to Hardhats, kdt...@gmail.com
Hi Kevin,

I think--for now--we'll have to use the default path option as you
suggested, using the Windows Camera and Scanner Wizard to carry out
the scan itself. (If you do get a chance to look into the code to see
how the image type is specified via WIA and make an update, please let
us know!)

Also, while I was exploring the scanning module (on my Windows XP set,
which works), I noticed that images uploaded via the scanning tool is
being sent to the main CPRS folder (C:\Program Files\VistA\tmg-cprs).
I wonder whether it might be helpful for these to go to a dedicated
images subfolder (e.g. C:\Program Files\VistA\tmg-cprs\Images) so that
images don't get mixed up with core software components? (This would
particularly be an issue when one is cleaning up the folder to get rid
of old images on a local set)

Thank you again for your help!

Tony

kdt...@gmail.com

unread,
Nov 5, 2011, 4:59:08 PM11/5/11
to Hardhats, Eddie Hagood
See below

On Oct 28, 6:25 pm, tony2468 <tony.j.pe...@googlemail.com> wrote:
> Hi Kevin,
>
> I think--for now--we'll have to use the default path option as you
> suggested, using the Windows Camera and Scanner Wizard to carry out
> the scan itself.  (If you do get a chance to look into the code to see
> how the image type is specified via WIA and make an update, please let
> us know!)

I thought that we had put a fix like this in. I'll try to check on
this next week when I'm back in the office.

>
> Also, while I was exploring the scanning module (on my Windows XP set,
> which works), I noticed that images uploaded via the scanning tool is
> being sent to the main CPRS folder (C:\Program Files\VistA\tmg-cprs).
> I wonder whether it might be helpful for these to go to a dedicated
> images subfolder (e.g. C:\Program Files\VistA\tmg-cprs\Images) so that
> images don't get mixed up with core software components?  (This would
> particularly be an issue when one is cleaning up the folder to get rid
> of old images on a local set)
>

I agree that images should not be stored in the main tmg-cprs folder.
Can you clarify where you are seeing that? When you say "scanning
tool", are you running a separate application? Or a dialog inside tmg-
cprs?

I will mention, that the default is for all local images to be deleted
after they have been uploaded. So the net result should be to not
have any residual images left on the client.

Kevin

Tony Perry

unread,
Nov 6, 2011, 11:39:49 AM11/6/11
to hard...@googlegroups.com, Nasir Mahmood
Hi Kevin,

Thanks in advance for looking into the code on the image type for capturing scans via WIA--I look forward to any news you might have!

As for the path, I used the image capture tool in TMG-CPRS to scan the image and upload it onto the server. (Attached is a screenshot showing the dialog box confirming the path). It looks like the images do disappear when CPRS is shut down (I tend to keep it open, which may be why I still saw them).

Best regards,

Tony


Image Capture (into tmg-cprs folder).tiff
Reply all
Reply to author
Forward
0 new messages