There does not seem to be a proper method in factory API to load raw bitmap from resource.
Not too often, but sometimes this may come handy, for instance if you want to use it as a logical mask, instead of displaying it on screen.
There is a method to load bitmap from the stream, but that would require additional manipulations. Also it is "hidden" in the IDevice factory, and took some time to find.
This is a suggestion to add three simple methods to the IGraphicsFactory : GetBitmap(w, h) (named in accordance to GetSprite, etc, idk if it's the best name), LoadBitmap(resource) and LoadBitmapAsync(resource). Implementation basically copies necessary parts of loadImage.
There does not seem to be a proper method in factory API to load raw bitmap from resource. Not too often, but sometimes this may come handy, for instance if you want to use it as a logical mask, instead of displaying it on screen. There is a method to load bitmap from the stream, but that would require additional manipulations. Also it is "hidden" in the IDevice factory, and took some time to find.
This is a suggestion to add three simple methods to the IGraphicsFactory : GetBitmap(w, h) (named in accordance to GetSprite, etc, idk if it's the best name), LoadBitmap(resource) and LoadBitmapAsync(resource). Implementation basically copies necessary parts of loadImage.