| |

VerySource

 Forgot password?
 Register
Search
View: 843|Reply: 8

How to get the length and width of the picture after uploading the picture in the fileupload control in C #?

[Copy link]

3

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-26 11:40:01
| Show all posts |Read mode
How to get the length and width of the picture after uploading the picture in the fileupload control in C #?
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-17 05:00:02
| Show all posts
You need to save the uploaded file first, and then use the Bitmap class to intercept it and obtain it through the instance's Size property.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-17 09:45:01
| Show all posts
Upstairs solution
Reply

Use magic Report

3

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-2-17 13:45:01
| Show all posts
How is the complete sentence written?
Reply

Use magic Report

3

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-2-19 12:15:02
| Show all posts
int xx = new Bitmap (filename);
filename is the picture name
This is incorrect, how do you write it?
Reply

Use magic Report

0

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-3-6 19:45:01
| Show all posts
After PostedFile.SaveAs
       Bitmap i = New Bitmap (fn, True);
      i.Width;
i.Height;
That's it
C # never used, syntax is not wrong
Reply

Use magic Report

3

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-10 13:45:01
| Show all posts
Still not working, what does your fn mean?
Reply

Use magic Report

3

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-10 16:15:02
| Show all posts
By the way, I use the WEB control.
Reply

Use magic Report

0

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-4-9 11:30:03
| Show all posts
fn is the file name of saveas
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list