BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-20-2007, 08:07 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2006
Model: 8310
Carrier: AT&T (formerly Cingular)
Posts: 47
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to display a .GIF image?

Please Login to Remove!

How does one go about displaying a GIF image within an application? I've read that it is possible to display bitmaps but what about gifs?
Offline  
Old 02-21-2007, 03:52 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can created EncodedImage object using static methods EncodedImage.createEncodedImage() and draw it using one of Graphics.drawImage() methods.
Offline  
Old 02-21-2007, 01:28 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2006
Model: 8310
Carrier: AT&T (formerly Cingular)
Posts: 47
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Skipper I managed to figure out how to create the encoded image. Now I just have to figure out how to display it on my MainScreen. I'll post a separate thread for that.
Offline  
Old 02-22-2007, 05:58 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You ale welcome!

I did it next way:
- extend net.rim.device.api.ui.Field and override method paint(Graphics g).
- call g.drawImage(startX, startY, width, height, image, 0, left, top) inside overriden paint(),
where image is EncodedImage object.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Siemens 6ES7 214-1BD23-0XB0 SIMATIC S7-200 CPU 224
$250.0
Siemens 6ES7 214-1BD23-0XB0 SIMATIC S7-200 CPU 224 pictureTRAK GPS RUBIDIUM TIME CODE PROCESSOR OSCILLATOR 10MHZ 5MHZ 1PPS
$1399.0
TRAK GPS RUBIDIUM TIME CODE PROCESSOR OSCILLATOR 10MHZ 5MHZ 1PPS pictureIntel M8212 - 8 Bit Input Output Port for M8080 CPU Model 8212 Military Version
$4.9
Intel M8212 - 8 Bit Input Output Port for M8080 CPU Model 8212 Military Version pictureNIB MODICON 110-CPU-411-00 110CPU41100 CPU MODULE
$299.99
NIB MODICON 110-CPU-411-00  110CPU41100  CPU MODULE  picture160CPU42401 MODICON HOST 984 VME486 64K 160-CPU-424-01 NEW
$1749.99
160CPU42401 MODICON HOST 984 VME486 64K 160-CPU-424-01 NEW  picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.