Solved

Reading Image Control into Binary Stream

Posted on 2006-12-01
3
263 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
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.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

770 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