How to access and display the jpg file on the fly using js in clie

B

Billy Zhang

I have a asp.net app, in the page there is a scan activex which could scan
and save a jpg file in client harddisk.

How could we access and display this jpg file on the fly using js in the
client IE?

Thanks,
-Billy zhang
 
S

Steven Cheng [MSFT]

Hi Billy,

As for web page and javascript, it is not allowed to access client
computer's file system. Actually, both IE7 and firefox restrict local image
file viewing. So far based on my research, some workarounds availables are:

1. Upload image to server-side so that we can use script to
programmtically display an html <img> via a server-side url

2. Integrate the image displaying functionality into the ActiveX control.
That means use ActiveX control to load local file image and display it.
Maybe you can add another ActiveX control on the page to do the work.

BTW, I found that silverlight 2 seems support local image loading.

#Loading Images from the Local File System in Silverlight 2.0
http://www.wintellect.com/cs/blogs/jprosise/archive/2008/03/15/loading-image
s-from-the-local-file-system-in-silverlight-2-0.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
 
S

Steven Cheng [MSFT]

Thanks for your reply billy,

As for image activex control, I'm not sure about those commercial ones. If
you want to build a simple one on the fly, you can refer to the following
examples on code project which maybe helpful:


http://www.codeproject.com/KB/openGL/ntgraph3d_atl.aspx

http://www.codeproject.com/KB/atl/hktbcatl1.aspx

https://secure.codeproject.com/KB/COM/WirgerPrintArticle.aspx?fid=42134&df=9
0&mpp=25&noise=3&sort=Position&view=Quick&select=1358489

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <[email protected]>
References: <[email protected]>
Subject: RE: How to access and display the jpg file on the fly using js in
Date: Wed, 13 Aug 2008 23:55:01 -0700
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top