Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:24, 30 August 2007.

KIJ000665 - Incorrect RGB values for JPG images on Series 40 3rd Edition

From Forum Nokia Wiki

Incorrect RGB values for JPG images on Series 40 3rd Edition KIJ000665
Overview The RGB values of the pixels in a JPG image on Series 40 3rd Edition devices may be altered from the values in the original images.
Category Java
Subcategory MIDP1.0/2.0
Reported against Series 40 3rd Edition
Nokia 5300, Nokia 6270
Date identified June 4, 2007
Symptoms -
Detailed description The RGB values of the pixels may be altered to differ from the values in the original images. For example, when you load an image which has only one color: RGB 255,254,128 and the RGB values from the image object are read after loading it in the MIDlet, they have been altered to 255,255,109. The problem is only limited to JPG images, the problem does not occur in PNG images.
How to reproduce The following code sample should print "ARGB:255,255,254,128" but prints "ARGB:255,255,255,109":
img= Image.createImage("/yellow.jpg");
in>t[] srcpixels=new int[1];
img.getRGB(srcpixels, 0,1,0,0,1,1);
System.out.println("ARGB:"+((srcpixels[0] >> 24) & 0xFF) + "," + ((srcpixels[0] >> 16) & 0xFF)+ "," + ((srcpixels[0] >> 8) & 0xFF) + "," + ((srcpixels[0] >> 0) & 0xFF));
Solution -
Related Discussions
Thread Thread Starter Forum Replies Last Post
FP2 software on FP3 platform rambler82 General Symbian C++ 6 2006-11-30 10:42
DirectGraphics.getPixels miroslav86 Mobile Java Tools & SDKs 1 2003-03-11 07:42
loading images from device's image folder dotcdotc Symbian Media (Graphics & Sounds) 15 2004-11-28 06:58
Transparency J2ME davidmanpearl Mobile Java Media (Graphics & Sounds) 5 2007-06-15 10:50
Using the Location Acquisition API in Series 60 3rd edition gpalvia Symbian Networking & Messaging 7 2007-08-29 06:56
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZKnownIssueQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX