You Are Here:

Community: Developer Discussion Boards

#1 Old Retrieving Images - 2003-09-12, 16:11

Join Date: Aug 2003
Posts: 7
Location: India
muditkmathur
Offline
Registered User
Hi All,

I would like to retrieve more than one image (five to be exact) from an http server using J2ME.
Can anyone of you help me in the process?

Regards,
Mudit.
Last edited by muditkmathur : 2003-09-12 at 16:35.
Reply With Quote

#2 Old 2003-09-12, 16:50

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
Do the same as you retrieve one
Reply With Quote

#3 Old 2003-09-12, 16:57

Join Date: Aug 2003
Posts: 7
Location: India
muditkmathur
Offline
Registered User
hello boss

what i need is i want to retrieve 5 images over http and store the details in the record store....as you know i need to connect to server 5 times....is there anyway that i can retrieve them at once???

have you ever worked with this kind of problem????

thanks
Reply With Quote

#4 Old 2003-09-12, 17:02

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
muditkmathur
as you know i need to connect to server 5 times....is there anyway that i can retrieve them at once???

Of course there is. Pack all the images into one file or make server tranfer them as one file and then create images from the received byte stream.
Reply With Quote

#5 Old 2003-09-12, 17:09

Join Date: Aug 2003
Posts: 7
Location: India
muditkmathur
Offline
Registered User
Of course there is. Pack all the images into one file or make server tranfer them as one file and then create images from the received byte stream.


well have you ever worked with this:)

how can we transfer them as one file from the server:) sorry if i am asking you too much info....but yeah i need it.....



thanks
Reply With Quote

#6 Old 2003-09-12, 17:35

Join Date: Aug 2003
Posts: 134
dannyc4
Offline
Regular Contributor
- create a big png?
Reply With Quote

#7 Old 2003-09-12, 18:18

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
muditkmathur

Have you ever tried to search for some information about things, that yeah i need it? :)

Make a search over this forum. This kind of questions is rather frequent here.
Have a look at this thread, for example:
http://discussion.forum.nokia.com/fo...threadid=28508

well have you ever worked with this:)
Not exactly. I read my images AND strings from a single resource within the JAR file - this way they are compressed much better and take less space. This looks generally the same
Reply With Quote

#8 Old 2003-09-12, 22:24

Join Date: Mar 2003
Posts: 62
huiben
Offline
Mobile3D at benhui.net
have the server to send in all five image files in one stream, you need to know the size of each file, so you can decouple them on the j2me client.

e.g.

img1.png is size 1000
img2.png is size 900

use data output stream to write

writeInt(1000)
writeInt(900)
write( byteDataOfImg1Png[] )
write( byteDataOfImg2Png[] )

then use createImage on the client side to decode them

ben

www.benhui.net - mobile developer resources
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