catalognanax.blogg.se

Picasa photo viewer only
Picasa photo viewer only




  1. #Picasa photo viewer only code
  2. #Picasa photo viewer only download

::SetTimer( m_hParentWindow, TIMER_ZOOM, 5, 0 )

picasa photo viewer only

#Picasa photo viewer only code

The zoom factor is calculated based on the current scroll value.Ĭopy Code bool ImageArea::OnMouseWheel( const int nX_I, const int nY_i,įloat fZoomValue = float( zDelta ) / WHEEL_DELTA Whenever mouse wheel received in Dialog, Dialog will send it to all components, and therefore ImageArea will receive mouse wheel message. glScalef() is called before displaying the texture, and therefore the texture will be scaled based on the current zoom factor. Zoom functionality is simply achieved with OpenGL scale feature. The details of Zoom, Translation and Rotation are explained below. Whenever Draw() receives, ImageArea will display this texture with zoom, translation, and rotation. BMPLoader class uses GdiPlus for creating RGB buffer of image file of type *.jpg, *.bmp, *.png, and *.tga. Whenever user requests a new image file, ImageArea creates the RGB buffer of new file with BMPLoader class. ImageArea creates one opengl texture with RGB data of the image file. The display and all operations ( Zoom, Translation, Rotation) of currently loaded image file is handled in this class. M_pVertexBuffer- >DrawVertexBuffer( GL_POLYGON ) glPixelTransferf is used to provide scale factor of Red, Green Blue channels. It is achieved with glPixelTransferf() before texture loading. The background image texture is created with 25% transparency. The RGB buffer with screenshot of desktop is obtained with ScreenCapture class. This class is responsible to create one texture with desktop image. Functionalities and Implementation of 4 components.Īll these classes are derived from GLWindowBase, the base class designed for handling different windows( or image components). Like Draw(), all mouse messages are also passed to the components.

picasa photo viewer only

Whenever we get WM_PAINT in dialog, Draw() commands are passed to all the 4 components. Initially, PicZoomDlg creates 4 main components of PicZoom, and adds to a vector named WindowList. PicZoom creates a MFC dialog, and the painting of client area is handled with OpenGL. The above figure shows the split up of main classes used in PicZoom. M_pBuffer, &stBitmapInfo,DIB_RGB_COLORS ) Int nStatus = ::GetDIBits( MemoryDC.m_hDC, (HBITMAP)BmpObj.m_hObject, 0, sz.cy, MemoryDC.BitBlt( 0, 0, sz.cx, sz.cy, &dc, 0, 0, SRCCOPY) Get temporary Dc for getting data from Desktop.īmpObj.CreateCompatibleBitmap(&dc, sz.cx, sz.cy) ĬBitmap * oldbm = MemoryDC.SelectObject(&BmpObj) Any comments and improvement suggestions are welcome.Ĭopy Code bool ScreenCapture::TakeScreenShot() I’m sure performance of this application is not satisfying with Picasa, but it’s an attempt to do something with OpenGL and MFC. In this article, I am just imitating some functionalities of Picasa Photo Viewer with OpenGL and MFC. Picasa Photo Viewer is a simple and superb image browser tool. OpenGL provides APIs to do some simple image operations such as zoom, pan, rotate. When I started studying OpenGL, I created a simple application to load an image from file and do simple rotation, zoom with it.

picasa photo viewer only

Limitations section explains graphics memory limitation of PicZoom. Since it requires some graphics memory to prepare all textures, graphics card is required to run PicZoom.

picasa photo viewer only

Shader programs are not used for display, and therefore I hope PicZoom will run without a high-end graphics card. PicZoom is an MFC Dialog based application, and OpenGL is used for drawing. This article discuss implementation details of PicZoom application.

  • Displaying functionality of current Button.
  • Functionalities and Implementation of 4 components.
  • #Picasa photo viewer only download

  • Download InstallPicZoom source - 17.92 KB.





  • Picasa photo viewer only