xZ6a33YaYEfmv
xZ6a33YaYEfmv

Reputation: 1816

C#, should I store Bitmap size separately?

My application works with large amount of images and I have to store some calculated info about each one. Frequently I need to get image's size for my calculations (sometimes without need to load original image). What is better: each time to load needed Bitmap and to get its size, or at first get the size and store it in a Size object?

Upvotes: 0

Views: 114

Answers (1)

Random Dev
Random Dev

Reputation: 52300

You said yourself "without need to load original image" - so sure get the compiled info for your bitmaps and store them. If you use a DB then you can for example store just your infos and the path to your bitmap. Only load big pictures if you really need them.

Upvotes: 1

Related Questions