I have written simple code in click event of button as below
When I run the application, I got the blank messagebox means it doesn't have the message text "HI" and also doesn't display OK messagebox button. Anybody have any idea. Please guide. Any type of help is appreciated.
in click event of Button1. But when I run the program and click on Button1, I get the messagebox but having no output means I don't get "Hello" text and also don't get OK messagebox button. Why it is so? Any type of help is appreciated
I want to know image dimension but I can't use Image.FromFile method to load image file because it is very slow and I want get image dimention quickly.
my image file format is JPEG
i will thank every one help me
(excuse me i can't speak english correctly)
You will need to read the header information from the file then. This link[^] takes you to the specification. Be aware though that there are *many* different versions of JPEG, so you will need to test this thoroughly.
thank you a lot.
but this site does not offer any C# code and I can't find image dimension obviously in it's jpeg header format.
thank you again.
if any one have more simple answer please send it. thank you again.
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.