The site isn't intended to show you C# code. It's the jpeg format only.
What you need to do is read in the file, a byte at a time until you read in the Xdensity and Ydensity bytes (each of which is two bytes). If you read in the first 18 bytes, the 14th will tell you the JPEG unit, the next two will be the X density and the last two will be the Y density.
I looked at some of your previous posts and many are considered 'generic' questions and several people have already told you to try to use Google. This forum is more for people who write their own code and then need help fixing it.
i create an application that user can change design forms at run time.
how can i save a C# form at run time
Are you saying you want the form's controls to have the same values the next time the user opens your app? You can save the data to a file or the registry when you exit, and simply read them when you start again.
Let me try that piece out... Looks interesting. It has something to do with the number of bytes in a character. The "old" ASCII uses 7 bits, while UTF8, you guessed it uses 8 bits. But it doesn't really explain why you get the weird character at the beginning.
Have you tried looking up some info about text encoding on google?
when you create a stream or file in UTF8 or in Unicode, it will start with a 2-byte
indication of the encoding; in your case it is 0xFE 0xBB. Only then will appear the
first "real" character (0x3C for <).
If you write to file, then open the file in a text editor, both cases work just fine,
because the editor consumes the optional 2-byte to understand how it needs to interpret
Your reading code however does not discover the encoding, it has that information baked
into the code, so it treats the 0xFE oxBB as real characters and since they are not
really printable (above 0x7E), it turns them into a single question mark.
it doesn't have any special algorithm. you can use .net methods (antialiasing enabled) to do it.
simply create a panel and on paint event use e.Graphics.DrawImage() method to draw your image in your panel that larged according the zoom when e.i. + key pressed.
Hi, thanks a lot for your reply. Actually I am using the same method as you have described but it is bit slow and getting complex. Because I have to draw the whole drawing again. Have u seen such kind of code or any sample. Plz let me know I will be very thankful to you.
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-23 13:35