SpriteLibrary

# SpriteDatabase
GetImageFromName Method

This function returns an image from the Properties.Resources. If we tell it to UseSmartImages, then it caches the image in memory. This makes it a little faster to return. If you have a lot of sprites to load, using this system can speed up things a fair bit. But, try to remember not to change the image that this returns unless you duplicate it first. Otherwise you will end up changing the image for all the other times you reference it. This is usualy a bad thing.

Namespace: SpriteLibrary
Assembly: SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)
Syntax
C#
Copy

    public Image GetImageFromName(
    	string Name,
    	bool UseSmartImages
    )

#### Parameters

Name
  Type: System
  String
  The string name of the image. If your image is usually named Properties.Resources.mySpriteImage, you will want to have "mySpriteImage" as the Name passed to GetImageFromName
UseSmartImages
  Type: System
  Boolean
  A parameter stating whether we should cache the image in memory or simply retrieve it from the resource manager.

#### Return Value

Type: Image
The resource image with the specified name
See Also

#### Reference

SpriteDatabase Class
SpriteLibrary Namespace