Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

I have a requirement in my application where i need to show zoom in effect(increasing from smaller to bigger size and vice versa) on images. i have been able to achieve it in following 2 ways:
1) Using PNG images of different sizes for different frames of zoom in effect.
2) Using BMP images and then stretching them using IGRAPHICS_StretchBlt().

Both ways gave me the desired result. But my problem is that using the above 2 ways increase my bar size considerably and my mod size is already touching the max limit. Hence i cannot afford the above ways.

I tried to use IGRAPHICS_StretchBlt() with PNG/JPG images. But that gives me a blank screen on emulator.

So, is there any way to use IGRAPHICS_StretchBlt() with PNG/JPG images. Or some other way 2 achieve the zoom in zoom out functionality without increasing the bar size considerably.

Kindly help. I am stuck bcoz of this.
Thanks in advance.

Hello Friends,
Kindly suggest me how to solve my above problem. Am looking forward to you ppl.
Thanks in advance.

Hello Friends,
Kindly suggest me how to solve my above problem. Am looking forward to you ppl.
Thanks in advance.

Hi,
If I understood uor question then u can easily use
IIMAGE_SetParm(m_pIImage,IPARM_SCALE,x,y);
change value of x and y to give zooming effect.
only thing is not all versions of brew provides IPARM_SCALE .

Hi,
If I understood uor question then u can easily use
IIMAGE_SetParm(m_pIImage,IPARM_SCALE,x,y);
change value of x and y to give zooming effect.
only thing is not all versions of brew provides IPARM_SCALE .

Ashutosh_Sharma wrote:
only thing is not all versions of brew provides IPARM_SCALE .
I am using BREW 2.0.1 and it does not provide IPARM_SCALE.
I am stuck.... Kindly help me with some solution.
Thanks.

Ashutosh_Sharma wrote:
only thing is not all versions of brew provides IPARM_SCALE .
I am using BREW 2.0.1 and it does not provide IPARM_SCALE.
I am stuck.... Kindly help me with some solution.
Thanks.

Hello friends,
I am still waiting for some positive response. Kindly help me with your suggestions. Is my problem solvable or not ?
Thanks.

Hello friends,
I am still waiting for some positive response. Kindly help me with your suggestions. Is my problem solvable or not ?
Thanks.

Using this sencond way
2) Using BMP images and then stretching them using IGRAPHICS_StretchBlt().
how are you getting your bar size affected? I mean using this way you are just making other image from a existing one which is loaded in your bar file.
This is the only way to achive zoon in/out.
You can also use resizing formulae to change the content of your IBitmap pixel data.

Using this sencond way
2) Using BMP images and then stretching them using IGRAPHICS_StretchBlt().
how are you getting your bar size affected? I mean using this way you are just making other image from a existing one which is loaded in your bar file.
This is the only way to achive zoon in/out.
You can also use resizing formulae to change the content of your IBitmap pixel data.

Rajni wrote:
how are you getting your bar size affected?
Well, if I use BMP image(6.02 KB) in place of PNG(1005 bytes)/ JPG(3.98 KB) image, that obviously increases the bar size considerably.
Rajni wrote:
You can also use resizing formulae to change the content of your IBitmap pixel data.
How Can I use the resizing formulae ?

Rajni wrote:
how are you getting your bar size affected?
Well, if I use BMP image(6.02 KB) in place of PNG(1005 bytes)/ JPG(3.98 KB) image, that obviously increases the bar size considerably.
Rajni wrote:
You can also use resizing formulae to change the content of your IBitmap pixel data.
How Can I use the resizing formulae ?

1. I think you can take your image as a png image and render it and save that screen in a IBitmap using which you can apply IGRAPHICS_SretchBlt.
2. formulae for resizing may be vary as per your requirement.
If you want simple resizing by some factor rx and ry then you can replace one pixel by rx or ry no of pixel and increase the canvas size,
If you want real resizing you have to calculate intermediate color components and replace then in final image.

1. I think you can take your image as a png image and render it and save that screen in a IBitmap using which you can apply IGRAPHICS_SretchBlt.
2. formulae for resizing may be vary as per your requirement.
If you want simple resizing by some factor rx and ry then you can replace one pixel by rx or ry no of pixel and increase the canvas size,
If you want real resizing you have to calculate intermediate color components and replace then in final image.

Rajni wrote:1. I think you can take your image as a png image and render it and save that screen in a IBitmap using which you can apply IGRAPHICS_SretchBlt.
How to render a PNG image and save that screen in IBitmap ? Some Sample code will be very helpful.
Rajni wrote:
2. formulae for resizing may be vary as per your requirement.
If you want simple resizing by some factor rx and ry then you can replace one pixel by rx or ry no of pixel and increase the canvas size,
If you want real resizing you have to calculate intermediate color components and replace then in final image.
I am not able to understand the whole concept of resizing. I mean which particular API are you talking about ?
Thanks

Rajni wrote:1. I think you can take your image as a png image and render it and save that screen in a IBitmap using which you can apply IGRAPHICS_SretchBlt.
How to render a PNG image and save that screen in IBitmap ? Some Sample code will be very helpful.
Rajni wrote:
2. formulae for resizing may be vary as per your requirement.
If you want simple resizing by some factor rx and ry then you can replace one pixel by rx or ry no of pixel and increase the canvas size,
If you want real resizing you have to calculate intermediate color components and replace then in final image.
I am not able to understand the whole concept of resizing. I mean which particular API are you talking about ?
Thanks

sambitsoft wrote:How to render a PNG image and save that screen in IBitmap ? Some Sample code will be very helpful.
chk this...
http://brewforums.qualcomm.com/showpost.php?p=67219&postcount=8
sambitsoft wrote:
I am not able to understand the whole concept of resizing. I mean which particular API are you talking about ?
Rajni shuld explain u this mechanism since i have not done this..

sambitsoft wrote:How to render a PNG image and save that screen in IBitmap ? Some Sample code will be very helpful.
chk this...
http://brewforums.qualcomm.com/showpost.php?p=67219&postcount=8
sambitsoft wrote:
I am not able to understand the whole concept of resizing. I mean which particular API are you talking about ?
Rajni shuld explain u this mechanism since i have not done this..