Is there a way to display all the image files(jpeg, png, �) present in the

Description:
Currently I am using �Sun Java� Wireless Toolkit 2.5 for CLDC, Beta 2 � toolkit for developing J2ME applications. I am using the �javax.microedition.amms.control.imageeffect� package(JSR 234) for adding effects like red eye, border, etc. I need to display all the images in my /res folder so that the user can select one from the list for further image processing. I used File Connection API for displaying the images from the file system's /root folder. But while trying to apply the image effects I found that I can not access the file system's /root folder through getResourceAsStream(). getResourceAsStream()could only access the /res folder . Is this correct? Is there any other way to give the InputStream to the media processor through setInput()? Is there any other alternative to getResourceAsStream()? Or Is there any direct way to access the /res folder and display all its files for the user to select?
Here is the code that I am using for providing the input and output streams and applying the image effect to the source file �Duke.jpg� in /res folder.
MediaProcessor mp = GlobalManager.createMediaProcessor("image/jpeg");
mp.addMediaProcessorListener(this);
outputStream = new ByteArrayOutputStream();
inputStream= getClass().getResourceAsStream(�Duke.jpg�);
mp.setInput(inputStream, MediaProcessor.UNKNOWN);
mp.setOutput(outputStream);
ImageTransformControl itc = ImageTransformControl) mp.getControl ("javax.microedition.amms.control.imageeffect.ImageTransformControl");
final int border =10;
itc.setSourceRect(itc.getSourceWidth(), 0, -itc.getSourceWidth() , itc.getSourceHeight() );
itc.setTargetSize(itc.getSourceWidth(),itc.getSourceHeight(),0);
itc.setEnabled(true);
mp.start();
mp.complete();

you need to set resource path correct place image file resource folder is correct but there is problem so yu need put the image in resource in this way C:\WTK23\apps\Image\res\example\hello\image.gif this work
in the code try this InputStream byteInput = getClass().getResourceAsStream("/example/hello/image.gif"); this works if you need any more help contant [email protected]

Similar Messages

  • I lost my iPod touch and now have a new one.  Is there a way to transfer all the songs on have in iTunes onto the new iPod?

    I lost my iPod touch and bought a new one?  Is there a way to transfer all the songs I have in iTunes onto the new iPod?  I am scared I will lose it all when I sync the new one or that I have to start all over.   Please help!!

    You can do better than that. You can click on the Restore button that appears under your device in iTunes. This will restore your iPod to factory settings as if it were fresh out of the box. But don't worry. By doing a restore, you will then be given the option to "Restore from Backup." This will allow you to restore the state of your previous iPod!!

  • Is there a way to view all the table names in a certain schema?

    Is there a way to view all the table names in a certain schema?

    SELECT table_name FROM user_tablesThat won't do much good given this piece of information:
    i am trying to finish a lab for school but i don't know what tables are in my
    professor's schema. The appropriate solution is
    SELECT table_name
    FROM all_tables
    WHERE owner = 'PROFESSOR_YAFFLE'
    /This will show the names of the tables which Prof. Yaffle has granted to us.
    Cheers, APC

  • Is there a way to detect all the photos already transferred to double (or triple) in iPhoto, so do not occupy space unnecessarily? Thank you from France.

    Is there a way to detect all the photos already transferred to double (or triple) in iPhoto, so do not occupy space unnecessarily? thanks from France

    Look in you main photo library. Are there doubles or triple photos there? If so delete the extras.
    All photos are stored in the photo library. When you move a photo into an album the photo is not duplicated. The album contains a pointer back to the original photos. These pointers or aliases take up very little space.

  • Is there any way to edit all the transitions in a project at the same time?

    I chose "insert with transition" when adding clips to my timeline, but the default is set for one second, which is longer than I'd like. I know how to change the duration of each transition one at a time, but is there any way to select all the transitions (there's about 90 of them) and adjust the duration for all of them at the same time?
    That's my main question, but I also would like to change the default cross-dissolve transition to be 15 frames instead of 30 for future projects. Anybody know if I can do that? I know I can create a 15 frame cross-dissolve and make it a "favorite", but it seems it would just be easier to change the default one instead.
    Thanks,
    Stephanie

    I know I can create a 15 frame cross-dissolve and make it a "favorite", but it >seems it would just be easier to change the default one instead.
    That's your only choice using FCE.
    Al

  • HT4236 on syncing photos to my iphone from my mac (iphoto), just 2 or 3 per event retain the edited verisons, the rest are shown in the original version. I'm confused by this. Is this a bug? Is there a way to see all the photos on the mac-edited version o

    on syncing photos to my iphone from my mac (snow leopard) (iphoto), just 2 or 3 per event retain the edited verisons, the rest are shown in the original version. I'm confused by this. Is this a bug? Is there a way to see all the photos on the mac-edited version on iphn?

    Thanks for your reply
    I solved my problem,
    Definitely a bug in syncing through itunes.
    - Connect Iphone with MacBook Pro through USB
    - Go to iphone on itunes, photos, deselect photo synchronization.
    - Sync (all pics will be removed from iphone)
    - Close itunes, iphoto, disconnect iphone
    - Select in finder: (home)-pictures-iphoto library.
    - Sec click on iphoto library and choose "show package contents"
    - Delete iPod Photo Cache
    - Close finder
    - Empty trash
    - Reconnect iphone
    - Allow photo synchronization again and everything works smooth.
    After this, changes made in iphoto are instantaneously reflected in iphone photos.
    Once every hundred photos, one gets detached from iphoto and then changes are no longer reflected (buggy) :-(
    In this case I erase the photo in iphoto, sync, go back to iphoto trash, reestablish the photo from the trash and sync again.
    Hope this improves. Still have to try cloud though.
    Thanks
    RC

  • Is there a way of listing all the current keyboard shortcuts?

    Within a program is there a way of listing all the current keyboard shortcuts , in a sensible order?
    I mean in shortcut order,  giving the name of the menu option (or other function) alongside.
    I often want this when I"m about to define my own keyboard shortcut, to see what's already taken.

    dominic23 wrote:
    https://discussions.apple.com/message/21487716#21487716
    Hope this helps.
    Not sure it does help. In http://support.apple.com/kb/PH10837 it says
    If you assign a keyboard shortcut that already exists for another command or another app, your new shortcut won’t work. Find the menu command that’s using it and reassign the keyboard shortcut for that item.
    I looking for a quick way to "find the menu command" - or even better, to avoid choosing one that's already being used.

  • HT201210 My itouch screen froze showing "plug to itunes" after trying to update to iOS6. Is there any ways to export all the pictures from it before restoring?

    My itouch screen froze showing "plug to itunes" after trying to update to iOS6. It still can be turned on and off. But the screen froze showing that message. I perhaps need to restore it. But is there any ways to export all the pictures from it before restoring?

    Only if y can get the iPod out of recovery mode with the program. Otherwise you will have to restore via iTunes which erases the iPod.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • Is there a way zero out all the sliders on all images in a folder?

    is there a way zero out all the sliders on all images in a folder? lightroom is applying what appears to be auto tone on all images as each images sliders are different. all import options are shut off or on 'none' so i have no clue why LR is applying these settings. When I reset images it puts them back the imported auto settings. So lightroom is perceiving those as baseline. Please help!

    Hi Rikk, thank you for the quick reply, I tried what you said and while this SHOULD have worked, for some reason it did not.
    So i'm importing 1500 RAW Canon 5dmkII files from my CF cards. under "apply during import" everything is marked as NONE.
    import goes smooth, all files brought in. and then Lightroom starts applying what appears to be auto tone. The reason i think it's auto tone is that the sliders are different from image to image, so it's not holding on particular prest.
    As a general rule i don't use presets, occasionally i'll use LR punch but i almost never use presets, or do mass bulk setting changes.
    This is all the info, I have been doing this same process since LR3 and never had this issue. Hope that helps clear things up and thanks again!

  • I backed up my iphone and it backed up to two years ago.  Is there a way to recover all the photos, etc. that I lost?

    I backed up my iphone and it backed up to two years ago.  Is there a way to recover all the photos, etc. that I lost?

    Cobb61 wrote:
    I backed up my iphone and it backed up to two years ago.  Is there a way to recover all the photos, etc. that I lost?
    Are you saying you were trying to backup your phone but instead it restored your phone from a backup that was two years ago
    If so there is no way to recover the recent data that was lost because it wasn't back up.
    did you at the very least import your pics to your computer as you would a digital camera?

  • Is there any way to put all the music FROM my iPod back onto my computer?  My school tech person not only wiped out my iTunes, the wiped out my back-up hard drive.

    Is there any way to put all the music FROM my iPod back onto my computer?  My school tech person not only wiped out my iTunes, the wiped out my back-up hard drive.

    Hello cgbuehling
    You can, but only the purchases that were made from the iTunes Store. Other content that was imported from a CD or other sources will not transfer over.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/ht1848
    Regards,
    -Norm G.

  • Forgot to save project before laptop shutdown.  Is there any way to recover all the captured video?

    Is there any way to recover all the video (slides?) captured by Captivate 5 if the project was not saved?  Just after I clicked on shutdown to power off my laptop I realized I forgot to save and close my Captivate project and unfortunately windows shut down without any prompting to save anything.   There are lots of files (.cpd) in the Adobe Captivate Cached Projects folder but no project file for 2+ hours worth of video snippets.  Is there any way to recover those?
    thanks!

    Hello,
    I hope to have good news for you. Can you check this blog post, we got the tip from the Adobe dev. team and Kevin did write it out:
    Cached projects can save you some cash
    Lilybiri

  • My laptop was stolen and i have a new one, is there any way to move all the picture folders to the new computer and not lose them?

    My laptop was stolen and i have a new one, is there any way to move all the picture folders to the new computer and not lose them? They stole my external harddrive too so unfortunately if i lose these, i have no way to get them back?

    What randers4 said. HOWEVER, if the photos were taken with a higher resolution camera than the iPhone what you recover will not be as high a resolution as the originals.

  • My daughters ipod touch was reset by accident and I don't think it was ever plugged into a computer. Is there a way to restore all the games she purchased on it?

    My daughters ipod touch was reset by accident and I don't think it was ever plugged into a computer. Is there a way to restore all the games she purchased on it?

    Restore from iCloud backup if shed has one.
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:        
    Downloading past purchases from the App Store, iBookstore, and iTunes Store         

  • Is there a way to 'refresh' all the titles in iTunes?

    I recently accidentally deleted all my iTunes files.  I'm resigned to the fact that I'll have to import all my CDs again, and have already started this process.  The problem is that the old titles are all still there, but when I click on them it says they can't be played because the original file is missing.  Do I need to go through and delete all the unplayable titles and playlists manually, or is there a way to automatically delete the 'empty' titles?

    Not en masse, but if you select each element that has an overlay applied, there is a reset button at the bottom of the Overlay Creator window.

Maybe you are looking for

  • Item wise payment transactions is possible

    hi sap gurus, I have 4 line items for a customer in the sales order at each item level it should carry payment transactions of that particlar item on its own. where we will configure in SPRO for that. regards, balaji.t 09990019711.

  • Editing Metadata in PSB files

    My production artist brought this to my attention: He is unable to add metadata to PSB file formats through Bridge (we are currently using CS4). Has anyone else experience this issue? Is XMP for this format not supported in CS4? Any ideas on how to w

  • Changing Material Number ON BAPI_REQUISITION_CHANGE!!!

    Dear Gurus, On BAPI_REQUISITION_CHANGE there is parameter name REQUISITION_ITEMS_OLD, on this parameter there was no item MATERIAL. I want to change this material when doing update (change). How could this BAPI doesn't support MATERIAL when doing upd

  • ECATT RAISE EXCEPTION error during multiple record processing

    I wish to load records to a table via an in-house-written ABAP program. This program consists of a main screen and multiple sub-screens. I am submitting an Excel spreadsheet as input. The eCATT configuration successfully runs the TCD script for alter

  • Replicated cache scheme with cache store

    Hi All, I am having following configuration for the UserCacheDB in the coherence-cache-config.xml I having cachestore class which inserts data in the database and this data will be loaded from data on application start up. I need to make this cache r