C# Класс JustPressPlay.Utilities.JPPImage

Показать файл Открыть проект

Открытые методы

Метод Описание
FileIsWebFriendlyImage ( Stream stream ) : bool

Checks to make sure the image uploaded is one of the approved types (.png, .gif, .jpg)

GetIconFileNames ( ) : List

Gets the achievement/quest icon file names in the system, WITHOUT extensions

Save ( System.Web.HttpServerUtilityBase serverUtilityBase, string filePath, Stream stream, int maxSideSize, int minSideSize, bool makeItSquare ) : void

Resizes and saves the image to the specified location

SaveAchievementIcons ( string newFileNameAndPath, string iconNameNoExt, int create, int explore, int learn, int socialize ) : bool

Saves the three achievement icons

SaveImageAtSquareSize ( string filePath, Image originalImage, int size, ImageSaveInfo info ) : void

Saves an image (from a stream) at a specific size

SavePlayerImages ( string filePath, string fileNameNoExt, Stream stream ) : System.Boolean

Saves the three player images

SavePlayerQRCodes ( string filePath, string fileNameNoExt, string qrString ) : System.Boolean

Saves the three player qrcodes

SaveQuestIcons ( string newFileNameAndPath, string iconNameNoExt, bool userGeneratedQuest ) : System.Boolean

Saves the three quest icons

Описание методов

FileIsWebFriendlyImage() публичный статический Метод

Checks to make sure the image uploaded is one of the approved types (.png, .gif, .jpg)
public static FileIsWebFriendlyImage ( Stream stream ) : bool
stream Stream
Результат bool

GetIconFileNames() публичный статический Метод

Gets the achievement/quest icon file names in the system, WITHOUT extensions
public static GetIconFileNames ( ) : List
Результат List

Save() публичный статический Метод

Resizes and saves the image to the specified location
public static Save ( System.Web.HttpServerUtilityBase serverUtilityBase, string filePath, Stream stream, int maxSideSize, int minSideSize, bool makeItSquare ) : void
serverUtilityBase System.Web.HttpServerUtilityBase
filePath string
stream Stream The bytes for the image passed in
maxSideSize int Maximum image width
minSideSize int
makeItSquare bool Whether or not to make the image a square
Результат void

SaveAchievementIcons() публичный статический Метод

Saves the three achievement icons
public static SaveAchievementIcons ( string newFileNameAndPath, string iconNameNoExt, int create, int explore, int learn, int socialize ) : bool
newFileNameAndPath string The file and path for saving the images
iconNameNoExt string The icon name without extension
create int Create points for the achievement
explore int Explore points for the achievement
learn int Learn points for the achievement
socialize int Socialize points for the achievement
Результат bool

SaveImageAtSquareSize() публичный статический Метод

Saves an image (from a stream) at a specific size
public static SaveImageAtSquareSize ( string filePath, Image originalImage, int size, ImageSaveInfo info ) : void
filePath string The file name and path for saving
originalImage Image
size int The size for saving
info ImageSaveInfo
Результат void

SavePlayerImages() публичный статический Метод

Saves the three player images
public static SavePlayerImages ( string filePath, string fileNameNoExt, Stream stream ) : System.Boolean
filePath string The file path (no file name)
fileNameNoExt string The file name without extension
stream Stream The image stream
Результат System.Boolean

SavePlayerQRCodes() публичный статический Метод

Saves the three player qrcodes
public static SavePlayerQRCodes ( string filePath, string fileNameNoExt, string qrString ) : System.Boolean
filePath string The file path (no file name)
fileNameNoExt string The file name without extension
qrString string
Результат System.Boolean

SaveQuestIcons() публичный статический Метод

Saves the three quest icons
public static SaveQuestIcons ( string newFileNameAndPath, string iconNameNoExt, bool userGeneratedQuest ) : System.Boolean
newFileNameAndPath string The file and path for saving the images
iconNameNoExt string The icon name without extension
userGeneratedQuest bool Is this a user generated quest?
Результат System.Boolean