|
how do i get byte array from the an image with out using memory stream
This code was posted by me...
|
|
|
|
|
Scanning the pixels, but I was referring to the receiving code, which doesn't use the memory stream for anything other than the WriteTo method
|
|
|
|
|
what is the other way...but i m not able to open the image using the code
pictureBox1.Image =new Bitmap("\\Program Files\\pic\\screen.Bmp");
and
pictureBox1.Image =File.Open("\\Program Files\\pic\\screen.Bmp", FileMode.Open, FileAccess.Read));its raising exception "Exception"
This code was posted by me...
|
|
|
|
|
Well if you have that filestream you can just fs.Write(buffer, 0, 1024)
Assigning a stream to the Image property should not even compile though
|
|
|
|
|
i m getting exception when i load to picture box
This code was posted by me...
|
|
|
|
|
Are you sure? Maybe you are getting it when you load the bitmap? You'd have to put it on 2 lines to know that.
|
|
|
|
|
exception "Exception" is caught on loading the image. why it is happening??
and wht type of exception is this
This code was posted by me...
|
|
|
|
|
sorry the exception is not cought on loading its in ht eline
picturebox1.image=new Bitmap(fs)
where fs is file stream
This code was posted by me...
|
|
|
|
|
NullReferenceException is caught in the line
fs=File.Open("\\Program Files\\pic\\screen.Bmp", FileMode.Open, FileAccess.Read);
pictureBox1.Image =new Bitmap(fs);
This code was posted by me...
|
|
|
|
|
So.. fs is null? AFAIK that can never happen, it would have to give an other exception as detailed here: File.Open on MSDN[^]
I don't know what else?
|
|
|
|
|
i don knwo wht is happening,The file is created. that i can see when when i browse the folder. but null reference exception is shown when i run applcn.
This code was posted by me...
|
|
|
|
|
Is the file ok? does it open in, say, paint without error?
|
|
|
|
|
no there is error in opening
its telling something like invalid data....how firts i need to convert byte array or memory stream to image....thats the problem persisting.............
This code was posted by me...
|
|
|
|
|
i got it correct!!!!
the error was in writing to file
thanks!!!
This code was posted by me...
|
|
|
|
|
You know, it's actually easier if it's "just pixels". Then you can just make an empty bitmap and write the pixels to it yourself.
But you had best find out, because it really is a very important difference..
|
|
|
|
|
Dear All,
I have developed different application and create it msi package for them, but this time its alittle bit different.
now i have developed an application which can be used over 34 provinces of afghanistan and monthly there will 2 or more updates for each province, so this mean that each province may have updates or not that depends.
i am asking which method of installation should i use? 1.creating msi package 2. creating by clickonce
my concern is always updates, i should be able to send them only udpates whenever the require not the whole setup file.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
I guess that you have one single application that must be configured to fit in for each of the 34 provinces. If it is that, I would use clickonce, because click-once contains the distribution itself.
Other way would be to write an application that contains the update mechanism itself, like an antivirus-app. There are different patterns and frameworks for this, so it should be easy to find a good starting point.
Regards
Sebastian
|
|
|
|
|
thx my friend, the fact that each province uses its own version and a single update to any province should be distributede for 34 provinces.
i would really appreciate to have some reference regarding update mechansim as u mentioned for antivirus or can i use ".cab" from VS setup for my deployment?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
MS published a pattern and practices-article about self-updating applications: http://msdn.microsoft.com/en-us/library/ms978574.aspx[^]
Have a look, it is quite interesting.
Didn't get it that each province has its own version. You mean you implemented ONE application, but to fit for the province it must be CONFIGURED?
|
|
|
|
|
thx, i mean the application is only one, but is installed in 34 provinces, if one provinces finds any bug or error in the application, that error needs be fixed and reflected to all provinces.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Ah okay, sounds good. Well as mentioned before, click-once will suit your requirements perfectly.
|
|
|
|
|
|
Hi.
We are working on .net 3.5(wpf,WCF). We have a set of string say a List<objects> of a class with string data. We need to print it.
What is the best way out, keeping it lightwieght and simple.
Thanks
|
|
|
|
|
If you are printing reports, go for ReportViewer control or Crystal report. Or else in-built classes to print data would be best bet.
There is a WPF/WCF[^] forum here. IMO that would be better place ask.
|
|
|
|
|
Thnaks ..
Needed a pust to start , got it . Something called
System.Drawing.Printing ,
Thanks a lot ..
|
|
|
|