You Are Here:

Community: Developer Discussion Boards

#1 Old Resize the image - 2003-03-23, 21:48

Join Date: Mar 2003
Posts: 9
Location: Malaysia
johncsl82
Offline
Registered User
hi...

anyone know how to resize the image using pure J2ME code?

Thanks...
Reply With Quote

#2 Old 2003-03-24, 09:38

Join Date: Mar 2003
Posts: 382
jalev's Avatar
jalev
Offline
Forum Nokia Expert
Hello

Because Java MIDP does not provide any magical methods for resize the images (png format) you have to make your own algorithm for it.
Reply With Quote

#3 Old 2003-03-24, 23:48

Join Date: Mar 2003
Posts: 3
Location: the wired
obfuskate
Offline
Registered User
are there any non-magical methods?
Reply With Quote

#4 Old Still looking - 2003-03-25, 12:12

Join Date: Mar 2003
Posts: 9
Location: Malaysia
johncsl82
Offline
Registered User
I'm still looking for one.........
Reply With Quote

#5 Old 2003-03-25, 15:43

Join Date: Mar 2003
Posts: 53
Location: Rome, Italy
Send a message via ICQ to marcgom Send a message via AIM to marcgom
marcgom
Offline
Regular Contributor
so, if i understand, there isn't a metod to resize loaded images from the jar files???
Reply With Quote

#6 Old 2003-03-26, 11:48

Join Date: Mar 2003
Posts: 231
Location: UK
LongSteve
Offline
Regular Contributor
You're correct.

Unless you use a third party device extension API, such as the Nokia UI, you cannot resize png images you load into Image objects. You can't get at the pixel data in order to process it as part of a re-size operation.

Anything where you can access individual pixels in images will let you scale and resize them. The Nokia UI or MIDP 2.0 for example. You still need to write the scaling code yourself though.

Cheers,

Steve
Reply With Quote

#7 Old 2003-03-26, 17:07

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Not necesarilly.
If you understand the PNG file format well enough you could write some standard MIDP code to resize the image by reading the file directly into a byte array or something instead of an Image.
I'd hate to be the one to try that, but if anyone is up for the challenge info on PNG can be found here:
url=http://www.libpng.org/pub/png/

shmoove
Reply With Quote

#8 Old 2003-03-26, 17:14

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Not necesarilly. If you understand the file format for PNG images well enough you can probably write some standard MIDP code to resize the images, by reading the information directly from the file into a byte array or something. I'd hate to be the one who has to try, but if anyone is brave enough here you can probably find the information you need.

shmoove
Reply With Quote

#9 Old 2003-03-26, 17:29

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Not necesarilly.
If you understand the PNG file format well enough you could write some standard MIDP code to resize the image by reading the file directly into a byte array or something instead of an Image.
I'd hate to be the one to try that, but if anyone is up for the challenge info on PNG can be found here:
url=http://www.libpng.org/pub/png/

shmoove
Reply With Quote

#10 Old 2004-02-13, 00:18

Join Date: May 2003
Posts: 3
satnamb
Offline
Registered User
Their is another option use the Image Transcoder gateway from Image Habitat - www.imagehabitat.com. The gateway reads the phone charateristics and scales an existing image on the fly.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia