@@ -61,6 +61,9 @@ string EnumFlagStringify(Type enumType)
6161 return flags ;
6262 }
6363
64+ /// <summary>
65+ /// DDS header if existing.
66+ /// </summary>
6467 public DDSGeneral . DDS_HEADER header { get ; set ; }
6568
6669 public string HeaderdwFlags
@@ -179,6 +182,7 @@ public ImageEngineImage(Stream stream, string extension = null)
179182 /// </summary>
180183 /// <param name="imagePath">Path to image file.</param>
181184 /// <param name="desiredMaxDimension">Max dimension to save.</param>
185+ /// <param name="enforceResize">True = forcibly resizes image. False = attempts to find a suitably sized mipmap, but doesn't resize if none found.</param>
182186 public ImageEngineImage ( string imagePath , int desiredMaxDimension , bool enforceResize )
183187 {
184188 LoadFromFile ( imagePath , desiredMaxDimension , enforceResize ) ;
@@ -191,6 +195,7 @@ public ImageEngineImage(string imagePath, int desiredMaxDimension, bool enforceR
191195 /// <param name="stream">Full image stream.</param>
192196 /// <param name="extension">File extension of original image.</param>
193197 /// <param name="desiredMaxDimension">Maximum dimension.</param>
198+ /// <param name="enforceResize">True = forcibly resizes image. False = attempts to find a suitably sized mipmap, but doesn't resize if none found.</param>
194199 public ImageEngineImage ( Stream stream , string extension , int desiredMaxDimension , bool enforceResize )
195200 {
196201 LoadFromStream ( stream , extension , desiredMaxDimension , enforceResize ) ;
@@ -214,7 +219,7 @@ public ImageEngineImage(byte[] imageFileData)
214219 /// </summary>
215220 /// <param name="imageFileData">Full image file data.</param>
216221 /// <param name="desiredMaxDimension">Maximum dimension.</param>
217- /// <param name="enforceResize">True = resizes to desiredMaxDimension if no suitable mipmap.</param>
222+ /// <param name="enforceResize">True = forcibly resizes image. False = attempts to find a suitably sized mipmap, but doesn't resize if none found .</param>
218223 /// <param name="mergeAlpha">ONLY valid when enforeResize = true. True = flattens alpha, directly affecting RGB.</param>
219224 public ImageEngineImage ( byte [ ] imageFileData , int desiredMaxDimension , bool enforceResize , bool mergeAlpha = false )
220225 {
@@ -284,8 +289,8 @@ private void LoadFromStream(Stream stream, string extension = null, int desiredM
284289 /// </summary>
285290 /// <param name="destination">File to save to.</param>
286291 /// <param name="format">Desired image format.</param>
287- /// <param name="GenerateMips">True = Generates all mipmaps. False = Uses largest available Mipmap .</param>
288- /// <param name="desiredMaxDimension">Maximum value of either image dimension .</param>
292+ /// <param name="GenerateMips">Determines how mipmaps are handled during saving .</param>
293+ /// <param name="desiredMaxDimension">Maximum size for saved image. Resizes if required, but uses mipmaps if available .</param>
289294 /// <param name="mergeAlpha">DXT1 only. True = Uses threshold value and alpha values to mask RGB.</param>
290295 /// <param name="mipToSave">Index of mipmap to save as single image.</param>
291296 /// <returns>True if success.</returns>
@@ -301,8 +306,8 @@ public bool Save(string destination, ImageEngineFormat format, MipHandling Gener
301306 /// </summary>
302307 /// <param name="destination">Stream to save to.</param>
303308 /// <param name="format">Format to save as.</param>
304- /// <param name="GenerateMips">True = Generates all mipmaps. False = Uses largest available Mipmap .</param>
305- /// <param name="desiredMaxDimension">Maximum value of either image dimension .</param>
309+ /// <param name="GenerateMips">Determines how mipmaps are handled during saving .</param>
310+ /// <param name="desiredMaxDimension">Maximum size for saved image. Resizes if required, but uses mipmaps if available .</param>
306311 /// <param name="mergeAlpha">ONLY valid when desiredMaxDimension != 0. True = alpha flattened, directly affecting RGB.</param>
307312 /// <param name="mipToSave">Selects a certain mip to save. 0 based.</param>
308313 /// <returns>True if success</returns>
@@ -312,6 +317,15 @@ public bool Save(Stream destination, ImageEngineFormat format, MipHandling Gener
312317 }
313318
314319
320+ /// <summary>
321+ /// Saves fully formatted image in specified format to byte array.
322+ /// </summary>
323+ /// <param name="format">Format to save as.</param>
324+ /// <param name="GenerateMips">Determines how mipmaps are handled during saving.</param>
325+ /// <param name="desiredMaxDimension">Maximum size for saved image. Resizes if required, but uses mipmaps if available.</param>
326+ /// <param name="mipToSave">Index of mipmap to save directly.</param>
327+ /// <param name="mergeAlpha">ONLY valid when desiredMaxDimension != 0. True = alpha flattened, directly affecting RGB.</param>
328+ /// <returns></returns>
315329 public byte [ ] Save ( ImageEngineFormat format , MipHandling GenerateMips , int desiredMaxDimension = 0 , int mipToSave = 0 , bool mergeAlpha = false )
316330 {
317331 return ImageEngine . Save ( MipMaps , format , GenerateMips , desiredMaxDimension , mipToSave , mergeAlpha ) ;
0 commit comments