β οΈ This blog post was created with AI assistance to help developers understand Uniface image handling capabilities.
π― What This Article Covers
If you're working with Uniface 10.4 and need to handle images in your application, you're in luck! Uniface supports a wide range of image formats out of the box. Let's explore what formats work and how the system handles them.
πΌοΈ How Uniface Handles Images
Uniface uses special filters that automatically work with many different image formats. When you load an image in a supported format, it just appears - no matter which operating system you're running on. Pretty convenient, right? π
Important Things to Know
Bitmap Images Only: Uniface works with bitmap-based images. Vector formats like PostScript or HP-GL won't work.
One-Way Conversion: The image filters can load various formats and convert them to Uniface's internal format for display. However, they cannot convert between different external formats or export back to other formats.
Smart Format Detection: Uniface automatically recognizes image formats in two ways:
- By looking at the file extension (like .jpg or .png)
- By reading the header information inside the image file itself
π Complete List of Supported Formats
Here's every image format that Uniface 10.4 supports:
πͺ Windows and OS/2 Formats
- BAF - Array files
- BMP - Bitmap files (the classic Windows image format)
- DIB - Device Independent Bitmap files
- ICO - Icon files (those little images you see in programs)
Example: If you have a Windows bitmap called "logo.bmp", Uniface will display it perfectly on any platform.
π Cross-Platform Formats
- GIF - CompuServe format (great for simple graphics and animations)
- JPG - JPEG format (perfect for photographs)
- PNG - Portable Network Graphic (modern web standard)
- TIF - TIFF format (commonly used in professional imaging)
Example: Your application can use "photo.jpg" for a user profile picture, and it will work seamlessly.
π₯οΈ Platform-Specific Formats
- MAC - Macintosh MacPaint Monochrome
- PICT - QuickDraw Picture (Macintosh format)
- SGI - Silicon Graphics format
- SUN - Sun Raster format
- XBM - X-Windows Bitmap (monochrome only)
- XPM - X-Windows Picture Bitmap (with colors)
- XWD - X-Windows Dump format
π¦ Other Supported Formats
- GEM - Digital Research (Novell) format
- IFF - Electronic Arts format (also known as LBM)
- PBM - Poskanzer Portable format
- PCX - Zsoft format (older PC format)
- PIC - Pictor/PcPaint format
- TGA - Truevision Targa format
- UNI - Uniface's own internal storage format (used for glyphs)
β οΈ Special Notes About PNG
While PNG is supported, there are some limitations you should know about:
- β No gamma corrections
- β No textual support
- β No ancillary chunks
- β Transparency doesn't work in Tree widgets
- β Dimming on disabled controls and widgets isn't supported
Example: If you use a PNG with transparency for a button, it will work fine. But if you try to use it in a Tree widget, the transparent areas might not display correctly.
π‘ Practical Tips for Developers
Choose the Right Format: For photos, use JPG. For graphics with text or logos, PNG or GIF work better. For simple icons, ICO or BMP are good choices.
File Extensions Matter: Always use the correct file extension. If you name a JPEG file "image.bmp", Uniface might get confused.
Cross-Platform Development: Stick to common formats like JPG, PNG, or GIF if your application needs to run on multiple platforms. These formats are universally supported.
Performance Consideration: Uniface converts all images to its internal format for display. This means the first time an image loads might take a moment, but subsequent displays will be faster.
π Real-World Example
Let's say you're building a customer management system with Uniface:
- Use JPG for customer profile photos (good compression for photos)
- Use PNG for your company logo (sharp, clear graphics)
- Use ICO for application icons
- Use GIF for simple status indicators or small graphics
All these formats will work seamlessly across Windows, Linux, and other platforms where Uniface runs!
π Summary
Uniface 10.4 supports an impressive range of image formats, making it easy to incorporate visual elements into your applications. The automatic format detection and cross-platform compatibility mean you can focus on building features rather than worrying about image handling.
Remember: Uniface handles bitmap images only, works one-way (import only), and automatically detects formats. Choose your image formats wisely based on your specific needs, and you'll have a smooth development experience! π
Keywords:
uniface imageformats bitmaps crossplatform
Top comments (0)