public HPdfImage LoadRawImageFromMem(byte[] data, int width, int height, HPdfColorSpace color_space, uint bits_per_component) { if (width * height < data.Length) { string s = "error-code=0x1030 detail-code=0"; throw new Exception(s); } IntPtr hobj; hobj = HPDF_LoadRawImageFromMem(hpdf, data, width, height, color_space, bits_per_component); return new HPdfImage(hobj); }
private static extern IntPtr HPDF_LoadRawImageFromMem(IntPtr pdf, byte[] data, int width, int height, HPdfColorSpace color_space, uint bits_per_component);
public HPdfImage LoadRawImageFromFile(string filename, uint width, uint height, HPdfColorSpace color_space) { IntPtr hobj; hobj = HPDF_LoadRawImageFromFile(hpdf, filename, width, height, color_space); return new HPdfImage(hobj); }
private static extern IntPtr HPDF_LoadRawImageFromFile(IntPtr pdf, string filename, uint width, uint height, HPdfColorSpace color_space);