Solved

Reading Image Control into Binary Stream

Posted on 2006-12-01
3
261 Views
Last Modified: 2012-05-05
Hi,

Is there a way by which I can read data from my web form's image control into binary stream.
And then save that stream to server as image file.

or can I read an image file on users computer into a binary file.


0
Comment
Question by:param4r
  • 2
3 Comments
 
LVL 11

Expert Comment

by:ch2
ID: 18055788
Which technology you want to use?

PHP, ASP, Script?

Here you have an example using vbscript:

http://www.eggheadcafe.com/articles/20010829.asp
0
 

Author Comment

by:param4r
ID: 18059149
thanks ch2,

thanx for replying.

the code in the url is written in VBScript, I doubt that it will work in my case because I want to read the file from the client's hard disk, and that can be achieved with javaScript only.

I also read an article which uses the exact technique provided by you in the url, using javascript.

I tried to write the code in Javascript, but I got stuck, here is my code

    var BinaryStream = new ActiveXObject("ADODB.Stream")
    BinaryStream.Type = 1;
    BinaryStream.Open();
    BinaryStream.LoadFromFile("d:\\temp\namrata.jpg");

the last line do not execute successfully.








0
 
LVL 11

Accepted Solution

by:
ch2 earned 500 total points
ID: 18065418
I think you cannot do that only with javascript.

Would work using server-side scripting like perl, asp, php.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope‚Ķ
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now