Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Using bitmaps with Symbian and Maemo Platforms

From Wiki
Jump to: navigation, search

This article compares the task of using bitmaps on Symbian and Maemo/MeeGo platforms. It is part of the series Comparing S60 and Maemo Platforms.

Article Metadata
Created: ebra (19 Nov 2007)
Last edited: hamishwillee (30 May 2013)

Tip.pngTip: Application developers should use Qt rather than the native APIs listed below.

Needs-update.pngThis article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons: hamishwillee (17 Nov 2011)
Article incomplete - the description of MeeGo has no comments, and the explanation for Symbian is empty. Also Qt is the application development framework for both platforms, and this should also be demonstrated.

S60 Platform

Maemo Platform

/* create image */
GdkImage* create_image(GdkPixmap* pixmap,GdkDrawable* drawable,gint W,gint H,gint X,gint Y)
GdkImage* image1 = NULL;
GdkImage* image2 = NULL;
guint32 ref, pixel;
gint i,j;
image1 = gdk_drawable_copy_to_image(pixmap,NULL,0,0,0,0,W,H);
image2 = gdk_drawable_copy_to_image(drawable,NULL,X,Y,0,0,W,H);
ref = gdk_image_get_pixel(image1,0,0);
for ( i=0; i<W; i++ )
for ( j=1; j<H; j++ )
pixel = gdk_image_get_pixel(image1,i,j);
if ( pixel != ref ) gdk_image_put_pixel(image2,i,j,pixel);
return image2;
/* redraw */
void callback_redraw (GtkWidget *widget, GdkEventExpose *event, gpointer data)
GdkPixmap* pixmap = NULL;
pixmap = mainview->pixmaps[index].pixmap;
if ( pixmap!=NULL )
gdk_drawable_get_size(pixmap, &width, &height);
if ( spacing(mainview->pixmaps[index].utf_category) )
total_width += width;
X = mainview->drawing_area->allocation.width - total_width +
mainview->X + mainview->pixmaps[index].X;
Y = mainview->Y + i * ROW_HEIGHT + mainview->pixmaps[index].Y;
image = create_image(pixmap,widget->window,width,height,X,Y);
This page was last modified on 30 May 2013, at 06:39.
35 page views in the last 30 days.