From 5a422aba704c375a307a902bafe658342e209906 Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:15 +0000 Subject: First commit - moving from LuaForge to SourceForge --- html/en/storage_samples.html | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 html/en/storage_samples.html (limited to 'html/en/storage_samples.html') diff --git a/html/en/storage_samples.html b/html/en/storage_samples.html new file mode 100644 index 0000000..d4f5c41 --- /dev/null +++ b/html/en/storage_samples.html @@ -0,0 +1,79 @@ + + + + + + +Storage Samples + + + + + +

More Storage Samples

+

See the Storage Guide for simple storage +samples.

+

Information

+ +

This is a command line application that displays information obtained from + a file using the IM I/O functions, basically imFile functions. It + depends only on the IM main library.

+

Here is an output sample:

+ +
IM Info
+  File Name:
+    exif_test.tif
+  File Size: 9.00 Mb
+  Format: TIFF - Tagged Image File Format
+  Compression: NONE
+  Image Count: 1
+  Image #0
+    Width: 2048
+    Height: 1536
+    Color Space: RGB
+      Has Alpha: No
+      Is Packed: Yes
+      Is Top Down: Yes
+    Data Type: byte
+    Data Size: 9.00 Mb
+    Attributes:
+      YResolution: 72.00
+      XResolution: 72.00
+      DateTime: 2004:01:14 11:30:11
+      Make: SONY
+      ResolutionUnit: DPI
+      Model: CD MAVICA
+      Photometric: 2
+ +

You can view the source code here: + im_info.cpp

+ +

Copy

+ +

This is a command line application that copies all the information from one + file to another using the IM I/O functions. It depends only on the IM main + library. It is usefull for testing the drivers.

+

You can view the source code here: + im_copy.cpp

+ + +

Load Bitmap from Resource File

+

In Windows if you have a bitmap stored in a resource file, like this:

+ +
bitmap_test BITMAP bitmap_test.bmp
+
+

The you could retreive it using the following code:

+
#include <windows.h>
+#include <im.h>
+#include <im_dib.h>
+
+HBITMAP hBmp = LoadBitmap(hInstance, "bitmap_test");
+imDib* dib = imDibFromHBitmap(hBmp, NULL);
+imImage* image imDibToImage(dib);
+imDibDestroy(dib);
+
+ + + + + -- cgit v1.2.3