public static void SaveToFile(FreeImageBitmap fib, string filepath, bool save_metadata) { if (!FreeImageIcsNativeMethods.SaveImage(fib.Dib, filepath, save_metadata)) { throw new FreeImageException("Unable to save file"); } }
public void AppendHistory(Dictionary <string, string> metadata) { foreach (KeyValuePair <String, String> entry in metadata) { FreeImageIcsNativeMethods.IcsAddHistoryString(this.ics, entry.Key, entry.Value); } }
public IcsFile(string filepath) { if (!IcsFile.IsIcsFile(filepath)) { throw new ArgumentException("Not an Ics File"); } this.filepath = filepath; FreeImageIcsNativeMethods.IcsOpen(ref this.ics, filepath, "rw"); }
protected virtual void Dispose(bool disposing) { if (!this.disposed) { // dispose of the unmanaged resources if (this.ics != IntPtr.Zero) { // If there is history write that. //this.WriteHistory(this.ics); // Dispose of the unmanaged resources FreeImageIcsNativeMethods.IcsClose(this.ics); } this.disposed = true; } }
public void AppendHistory(string key, string value) { FreeImageIcsNativeMethods.IcsAddHistoryString(this.ics, key, value); }
public static bool IsIcsFile(string filepath) { return(FreeImageIcsNativeMethods.IsIcsFile(filepath) > 0); }
public void SetNativeIntensityScale(double origin, double scale, string units) { FreeImageIcsNativeMethods.SetNativeIntensityScale(this.ics, origin, scale, units); }
public void SetNativeScale(int dimension, double origin, double scale, string units) { FreeImageIcsNativeMethods.SetNativeScale(this.ics, dimension, origin, scale, units); }
public void DeleteHistory() { FreeImageIcsNativeMethods.IcsDeleteHistory(this.ics, ""); }