BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-05-2008, 02:59 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default stretch image

Please Login to Remove!

hi,
i've got a problem with my startscreen. it displays a fullscreen image on BB 8707.
Now i've got a curve and there the resolution mus be different, because the image is not displayed all over the fullscreen. so i need to stretch the image.

so how do i stretch the image??

thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after

Last edited by hibbert : 12-05-2008 at 03:06 AM.
Offline  
Old 12-05-2008, 04:15 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you are aware of the fact that an upscaled bitmap (or non-vector image) looks quite bad? then you can change the size with EncodedImage.scaleImage32, be aware of the method using fix32 ints. i would suggest to include the biggest needed image and scale down, may look better, depending on the factor.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 12-05-2008, 06:23 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
thanks for your fast reply =)

but i don't know how to resize the bitmap. I have this little function (constructor):
PHP Code:
clsImage(String _bildint widthint height) {
        
imgHeader Bitmap.getBitmapResource(_bild);
        
surface = new Bitmap(widthheight);
        
surfaceField = new BitmapField(surface);
        
= new Graphics(surface);
        
g.drawBitmap(0,0,width,height,imgHeader,0,0);
     } 
so how do i use the EncodedImage function??
which of these fields is the correct one for resizing my bitmap? or how to i implement the EncodedImage?

thanks again, hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 12-05-2008, 09:45 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can create an encoded image from a resource. just replace your Bitmap.getBitmapResource with this:
EncodedImage image = EncodedImage.getEncodedImageResource(resource);
you can now call image.scaleImage32
I am pretty sure you can find out the rest yourself (like how to use Fix32 ints etc)
__________________
java developer, Devinto, hamburg/germany
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





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