[URGENT]Is it possible to get the drawing on canvas to an imagebuffer?

Hey Everyone
I am having serious problems in my project 'Picture Editor'.
I am drawing objects on to the canvas since this is the only way u can draw in J2me. Now I need to get that drawing on the canvas as an Image or as an imagebuffer(rgb[]) so that I can store it. But is it possible to do that.
Can anyone help me with this.

The RecordStores store plain byte arrays. If you want to have something like a filename and such, then you need to come up with your own "format". For example, before the begginning of the pixel data you put in a null terminated string. Then when you read the data, you first read all the bytes up to the fist 0 you find, this part will be the name, and after that you know will come the actual image data. In short, you can put in whatever you want in a RecordStore, you just have to make sure you read things in the same way you wrote them.
Another option would be to just create separate RecordStores for each image, with the name of the image. But this could become a problem if you are saving a lot of images.
shmoove

Similar Messages

  • We need to buy Adobe Framemaker version 11. The distributor is only able to provide us with version 12. Can someone suggest me how is it possible to get the license for ver 11 serial  key after purchasing ver 12 and also how to get the download details ?

    We need to buy Adobe Framemaker version 11. The distributor is only able to provide us with version 12. Can someone suggest me how is it possible to get the license for ver 11 serial  key after purchasing ver 12 and also how to get the download details ?   Urgent response will be helpful.D

    Adobe Support helped us with a similar query. We ended up with exactly what you need.

  • JNI assert fails getting the drawing surface

    The following code fails because JAWT_DrawingSurface *ds is null after the assignment ds = awt.GetDrawingSurface(env, canvas);
    I don't understand why this is null and am struggling to debug the code with print statements. As I don't know how to debug JNI through xcode. think it's probably something simple I am missing as I downloaded a working example that uses the same setup code.
    Thanks for all your help
    David
       JAWT awt;
        JAWT_DrawingSurface* ds = NULL;
        JAWT_DrawingSurfaceInfo* dsi = NULL;
        JAWT_MacOSXDrawingSurfaceInfo* dsi_mac = NULL;
        jboolean result = JNI_FALSE;
        jint lock = 0;
        // get the AWT
        awt.version = JAWT_VERSION_1_4;
        result = JAWT_GetAWT(env, &awt);
        if (env->ExceptionOccurred()) {
            env->ExceptionDescribe();
        assert(result != JNI_FALSE);
        // Get the drawing surface.  This can be safely cached.
        // Anything below the DS (DSI, contexts, etc)
        // can possibly change/go away and should not be cached.
        ds = awt.GetDrawingSurface(env, canvas);
        if (env->ExceptionOccurred()) {
            env->ExceptionDescribe();
         if(!ds)
              std::cout << "ds is null" << std::endl;
              std::cout << "env address is : " << env << std::endl;
              std::cout << "canvas address is : " << &canvas << std::endl;
              return;
        assert(ds != NULL);
        // Lock the drawing surface
        // You must lock EACH TIME before drawing
        lock = ds->Lock(ds);
        if (env->ExceptionOccurred()) {
            env->ExceptionDescribe();
        assert((lock & JAWT_LOCK_ERROR) == 0);
        // Get the drawing surface info
        dsi = ds->GetDrawingSurfaceInfo(ds);
        // Check DrawingSurfaceInfo.  This can be NULL on Mac OS X
        // if the windowing system is not ready
        if (dsi != NULL) {
            // Get the platform-specific drawing info
            // We will use this to get at Cocoa and CoreGraphics
            // See <JavaVM/jawt_md.h>
            dsi_mac = (JAWT_MacOSXDrawingSurfaceInfo*)dsi->platformInfo;
            if (env->ExceptionOccurred()) {
                env->ExceptionDescribe();
            // Get the corresponding peer from the caller canvas
            NSView *view = dsi_mac->cocoaViewRef;
            // Get the CoreGraphics context from the parent window.
            // DO NOT CACHE NSGraphicsContexts -- they may go away.
            NSWindow *window = [view window];
            NSGraphicsContext *ctxt = [NSGraphicsContext graphicsContextWithWindow:window];
            CGContextRef cg = static_cast<CGContextRef>([ctxt graphicsPort]);
            // Match Java's ctm
            NSRect windowRect = [window frame];
            CGContextConcatCTM(cg, CGAffineTransformMake(1, 0, 0, -1, dsi->bounds.x, windowRect.size.height-dsi->bounds.y));
            // Draw a pattern using CoreGraphics
            CGContextSetRGBFillColor(cg, 1.0f, 0.0f, 0.0f, 1.0f);
            CGContextFillRect(cg, CGRectMake(15, 15, dsi->bounds.width-30, dsi->bounds.height-30));
            // Free the DrawingSurfaceInfo
            ds->FreeDrawingSurfaceInfo(dsi);
            if (env->ExceptionOccurred()){
                env->ExceptionDescribe();
            }

    I've got past that problem, which was due to the declaration of the jni functions not being in a canvas class. However, I am now getting a segmentation fault when assigning the lock.
    lock = ds->Lock(ds);

  • I've recently been given a macbook pro from uni, with lots of adobe software on. I want to pair it with my iMac which has music etc and is it possible to get the software to the imac and the files to the macbook?Giving me the best of both :-)

    I've recently been given a macbook pro from uni, with lots of adobe software on. I want to pair it with my iMac which has music etc and is it possible to get the software to the imac and the files to the macbook?Giving me the best of both :-)

    You would need the original installation disks or files for the Adobe software to get it onto your iMac, and having it on two computers may not be allowed by your university's licensing. Talk to whoever issued the MacBook.
    As to the music, just copy it over to the MacBook, either via Home Sharing, file sharing, or an external storage medium (hard drive, USB flash drive, etc.).
    Regards.

  • Is it possible to get the style, font and related info of a paragraph of a in design file and write it on the same in design file  on the  left side

    Is it possible to get the style, font and related info of a paragraph text  of a in design file and write  all the stuff on the same in design file  on the  left side with small fonts 
    as
    Lets  this is a text in in design file    :
    style : abc                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 12                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu
    style : xyz                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 10                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu

    Hi Poojith
    Not sure if this would solve your requirment but just in case might be helpful:
    1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
    [http://www.sapdesignguild.org/resources/htmlb_guidance/]
    2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
    Thanks
    Deepak

  • HT1222 Is it possible to get the SSL fix without having to install ios7 (which I tried and hated) or jailbreaking the devices?

    I have a few ipads, iphones and ipod touches of various models, and all run iOS6 of various types (whatever they were running when I last updated them before iOS 7 came along and stopped me being able to get newer versions of 6).
    I tried iOS7 for a while but hated both the appearance and some of the things that changed.
    My ipods have updated to a new version of iOS6 with the SSL fix.
    I can't seem to get this option for the ipads or iphones.
    Is it possible to get the important SSL update for iOS 6 for iPhone5, iPad3, ipad4 and ipad mini (not retina) without having to go to iOS7?
    (It seems that I can get a fix by jailbreaking but I really don't want to do that if there's another option since I have no need for it otherwise.)
    Thanks a lot.

    Thanks, that's helpful. I expected that answer, since I read a load of stuff about Apple pushing people to get iOS 7 despite it having people who disliked it, but was hopeful it was not the case
    Some of the changes, like to calendar were just frustrating.
    Not a big problem though - just means that the next phone and tablet hardware update I get won't be apple.
    Thanks a lot for the swift and helpful replies.

  • Is it possible to get the information from the complete forms send to different email account

    When i have a paid account is it than possible to get the information from the different forms send to seperate emailaddresses.
    Who dont have a account from formscentral but just need the information directly in there own inboxes?
    Because we're looking for a good and simple way to make qoustion & complain forms. But these need to go to different people in the company.

    You can have notifications sent to multiple email addresses, but each will need to have a FormsCentral account.  They can be free accounts.  What you do is create your form and set up the email addresses that you want the information to go to to be Co-authors or Contributors.  The co-author/contributor accounts will then need to log into FormsCentral, go to the Options tab and check the email notifications checkbox. 
    I hope this helps.
    -Jeff

  • Is it possible to get the image from the i pad when mirroring via Apple TV to fill the screen instead of appearing as a screen within a screen?

    When mirroring, is it possible to get the image from the ipad to fill the screen on the TV instead of appearing as a screen within a screen?

    Welcome to the Apple Community.
    No, the iPad has an aspect ratio of 4:3, a TV has an aspect ratio of 16:9, to fit one into the other is impossible without distorting the picture. If your TV has a zoom feature, you may be able to use this to fill the screen a little more to your liking, but this will result in cropping top and bottom.

  • Is it possible to get the position of a charcter from a string ?

    Hi !
    Is it possible to get the position of a charcter from a string ?
    Example:
    @VAR contains the following text "ABCDEFGHIJKLM"
    I'am seaching for FGH, it start on pos. 6 en ends on pos 8.
    How can I get these numbers 6 and 8 ?
    So, I can use them in the MID(text,start,len) function.
    Thanks!

    Hi Sooraj,
    I'll explain more in detail:
    From a web-service I get a variable called @Spec.
    This variable contains the following:
    "MOTORTYPE[CR]D-QW1234[LF]PART[CR]1234-FRD-X[LF]"
    or
    "MOTORTYPE[CR]ABC[LF]PART[CR]E-435[LF]"
    I need the values behind MOTORTYPE[CR] and behind PART[CR]
    But you’ll see that the positions of these values are different each time.
    If there is a way to get the (start) position of "MOTORTYPE[CR]" or "PART[CR]" and the (end) position of the first "[LF]" behind that,
    then I could use the MID() function to get the correct values.
    The values will be displayed in a table view (between other fields).
    An ABAP-call/function won’t work . . . how should I invoke this within a table column/field object ? (system action ?)

  • Is it possible to get the balance sheet report by using profit center

    Dear Experts,
    could you please help me out regarding the following issue.
    business area wise we can get the balance sheet but i want to know is there any possibility to get the BS by using profit centers only for BS Items or can we assign biasness area as well as profit center in a single screen.

    I think you can use this report. S_ALR_87013336
    Regards
    Radha

  • Data recovery, possible to get the file structure back as well?

    Hi Apple Smarties,
    I closed my laptop lid on my external LaCie drive without ejecting the drive first (smart one!). After that the external drive wouldn't mount. I've used Data Rescue 3 to recover all the files from the drive... however it's just lumping all the files into one big batch :-( ...anybody know if it's possible to get the files into the correct files structure they were at before the drive got corrupted?
    Assistance would be HUGELY appreciated.
    Many thanks
    Kind regards
    Doug

    Thank you Barry. Yes, Comcast is my mail provider. It is a POP account.
    Now, if you could point me in the right direction to do that re-build, I would be ever so grateful. I did use the "rebuild" button on the Mail tool bar for that box and it did not help. Perhaps there is something else I could do?
    As I mentioned, I am very new to the Mac world, and I get a little lost. Well, at age 73, I guess that's not hard to do! Been on Windows forever so lots of the terminology in Apple is quite different for me.
    Message was edited by: JanJones

  • Is it possible to get the total value for column and assign to other field

    hi,
    Is it possible to get the total value of particular column and assign that value to another field?
    How to do this?
    Thanks in advance,
    SAN

    Afridi,
    My extended controller class code:
    package xxhr.oracle.apps.per.selfservice.appraisals.webui;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    import oracle.apps.per.selfservice.appraisals.webui.OverviewPageCO;
    import oracle.jbo.Row;
    public class XXOverviewPageCO extends OverviewPageCO {
    public XXOverviewPageCO() {
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("XXCalcAvgButton")!=null){
    throw new OAException("welcome",OAException.INFORMATION);
    //getSum(pageContext, webBean);
    private String getSum(OAPageContext pageContext, OAWebBean webBean) {
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject ratvo = (OAViewObject)am.findViewObject("CompetenceElementsVO");
    OAViewObject valuevo = (OAViewObject)am.findViewObject("PerRatingLevelsVO");
    Integer Sum = new Integer("0");
    int numofRows = ratvo.getRowCount();
    for (int x = 0; x < numofRows; x++) {
    Object Rating =
    ratvo.getRowAtRangeIndex(x).getAttribute("ProficiencyLevelId");
    if(Rating!=null) {
    int numofRowsforvalue = valuevo.getRowCount();
    for(int i=0;i<numofRowsforvalue;i++){
    if(valuevo.getRowAtRangeIndex(i).getAttribute("RatingLevelId").equals(Rating)){
    Object StepValue=valuevo.getRowAtRangeIndex(i).getAttribute("StepValue");
    Sum = new Integer(StepValue.toString()) + Sum;
    OAMessageStyledTextBean displayCompAvg=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompAvgText");
    displayCompAvg.setValue(pageContext,Sum);
    return null;
    But it is not affecting in the page.
    Can you please tell me what is the problem.

  • I have purchased a G3, because I am an apple fan. I want this a clean installation software provided. Only the link no longer works. Is there a possibility  to get the required software. I Preferably, the Dutch version, but if only the English it's okey

    I have purchased a G3, because I am an apple fan. I want this a clean installation software provided. Only the link no longer works. Is there a possibility  to get the required software. I Preferably, the Dutch version, but if only the English it's okey

    What model G3 is it? An iMac, a PowerMac, a MacBook, or a PowerBook? What is the processor (machine) speed?

  • I have just updated my 4s to IOS7. and now my battery discharge is significantly increase. With my Iphone fully charged, the battery run out within 6 hours without using the phone at all. Would it be possible to get the IOS 6.1.3 back to my 4S?

    I have just updated my 4s to IOS7. and now my battery discharge is significantly increase. With my Iphone fully charged, the battery run out within 6 hours without using the phone at all. Would it be possible to get the IOS 6.1.3 back to my 4S?

    Hi, thanks for the suggestion. I have tried as you suggested, and when opening the "purchased" apps some have the icloud logo next to them, but I only have "OPEN" against "Find My iPhone". When opening it up, it goes through the same routine; needs to be updated before proceeding, and wouldn't update because I don't have IOS8.
    Anything else I could try, or am I doomed!
    All of your help is much appreciated, thanks

  • I have the I-pad 1 and was wondering if it is possible to get the 5.0 update. Many aps now require it. Thanks

    I have the I-pad 1and was wondering if it is possible to get the 5.0 update. Many aps now require it. Thanks

    Yes - via iTunes on your computer.
    Connect the iPad to your computer and launch iTunes. Click on your iPad name under devices. Click on the Summary Tab in the iTunes window on the right and then click on Check for Update.

Maybe you are looking for