viewfinder bitmaps size

Login to reply to this topic.
Fri, 2006-01-20 16:20
Joined: 2005-11-28
Forum posts: 101
hej all
I have a strange problem with viewfinder...
im making
Code:
TSize finderSize = KViewFinderSize;
iCamera->StartViewFinderBitmapsL(finderSize);StartViewFinderBitmapsL()
( KViewFinderSize is TSize(176,140) )
and after i get ViewFinderFrameReady(CFbsBitmap& aFrame) i draw it on the screen (gc.bitblt(...))
and the problem is that on device i can see only a 'corner' of taken bitmap... it seems like phone takes a bitmap of size for example 400x300 and on screen its only left top corner of it (for example 128x128)
hope u understand what i meen...
So what shall i do to see all bitmap on screen

P.S. in emulator the size of aFrame in bitmapready is exacly like view finder size so whats wrong ?

Thx for help
BG

Thu, 2006-02-16 08:46
Joined: 2005-09-16
Forum posts: 141
Re: viewfinder bitmaps size
Hi,

Do like this,

      TRect rect = TRect(0,40,176,184);

TPoint iFinderPosition;//declare it in header file.      
      iFinderPosition = rect.iTl;
      iFinderPosition.iX += (rect.Size().iWidth - finderSize.iWidth)/2;
      iFinderPosition.iY += (rect.Size().iHeight - finderSize.iHeight)/2;               
//in draw function
gc.BitBlt(iFinderPosition, &aFrame);   
   

regards,
Eswar   
  • Login to reply to this topic.