<%@ page import="java.io.BufferedReader, java.io.InputStreamReader, java.io.IOException, java.io.UnsupportedEncodingException, java.net.URL, java.net.URLEncoder" %> <%! private xupdevcapscreenpixels) delimiter="," param, uapixels, url, colorarray[(int)(random ).append(resarray[0]); string[] } } private colorarray="value.split(" colorarray.length)]); } private encodedvalue="URLEncoder.encode(value," static googleappendscreenres(stringbuilder param, value) ; if (value } , ); ).append(resarray[1]); } } % random) & % googleappendurl(stringbuilder void ).append(param).append(=").append( " (uapixels="null)" !="null)" resarray="screenRes.split(delimiter); " screenres="xUpDevcapScreenpixels; " (resarray.length="2)" pagead=" " final http://pagead2.googlesyndication.com/pagead/ads? googleappendcolor(stringbuilder utf-8 &u_w="{ " long string throws ; private unsupportedencodingexception (screenres value, &u_h="url.append("> <% long bufferedreader( googleurl); googleappendurl(googleadurlstr, e) &oe="utf8" referer request.getremoteaddr()); googleadurlstr.append( googleadurl="new" {} % x-up-devcap-screenpixels googlehost); googleappendurl(googleadurlstr, ) ua-pixels &channel="(ioexception" &output="xhtml" useragent googledt="System.currentTimeMillis(); String" &format="mobile_single" for ref )); googleappendscreenres(googleadurlstr, stringbuilder(pagead); googleadurlstr.append( (request.getquerystring() ? } } ip googleurl : out.println(line); &markup="xhtml" host request.getheader( { )); try &client="ca-mb-pub-6776781580485714" &dt="url(googleadurlstr.tostring()); " new googlehost="(request.isSecure()" , + ).append(googledt); googleadurlstr.append( ad_type="text_image" url (line="reader.readLine())" !="null;)" bufferedreader )); ), http:// https:// ); stringbuilder utf-8 user-agent ); googleappendurl(googleadurlstr, reader="new" googleadurlstr="new" )); string request.getquerystring().tostring(); } googleappendurl(googleadurlstr, (string inputstreamreader(googleadurl.openstream(), ); googleadurlstr.append( line; catch>

Thursday, October 18, 2007

Jpeg libraries for Palm OS


jpeglib

jpeglib is a shared library for Palm OS handheld computers. It permits other applications to support easily JPEG encoding and decoding. JPEG is a standard compression method for photographic images. It's lossy, which means that the decoded image is very close to, but not exactly the same as the original image; this permits much larger compression ratios. The trade-off between quality and compression ratio can be chosen. JPEG is often used by digital cameras, such as the built-in camera of the Zire 71.

For the user of the application, jpeglib is just a PRC file which is installed on the Palm OS handheld like any other application file. It weights slightly less than 64 KB, and is shared by all the applications which rely on it. For the C or C++ developer, jpeglib comes with a single .h include file. Port to other languages should be straighforward.

download

Last update: 12 September 2003.

The ZIP archive weights 50 KBytes. It contains the PRC file, the include file you can use to develop your applications, sample code, and the source file.



PnoJpeg Library

The pnoJpegLib is a shared Library for PalmOS, which allows Applications to decode and encode Jpeg-Images with the Power of an ARM-Processor.

This library works very fine, but it accept only 16 bit bitmaps. And the resultant picture is not that much good one. And one more thing i find out is that, its not working in some of the codeWarrior version. It giving 1 byte Jpeg as the result.

In my programs i used a 8 bit to 16 bit convertion for the bitmaps.


depth = BmpGetBitDepth(bmpPtr);
if(depth!=16)
{
BmpGetDimensions(bmpPtr,&width,&height,&rowByte);
bmpP = BmpCreate(width,height,16,NULL,&err);
bwinH = WinCreateBitmapWindow(bmpP,&err);
temH = WinSetDrawWindow(bwinH);
WinDrawBitmap(bmpPtr,0,0);
bmpPtr = WinGetBitmap(bwinH);
bwinH = WinSetDrawWindow(temH);
WinDeleteWindow(bwinH,true);
//BmpDelete(bmpP);
}


Google
 
PalmProgramming