Get the canvas/screen of an object as a bitmap graphics? Help with post processing filter!

Let's say I want to create an effect of post-processing, such as changing the pixels of the screen in a color a little more red (AFTER this drawing), or do a screen wavey distortion.

I thought that my layout as follows:

final class MyPaintScreen extends FullScreen{
    //
    //... stuff here
    //
    public void paint(Graphics g){
        //all kinds of draw commands here, then
        //the post processing method is called
        PostProcesser.modify(g);
    }

}
final class PostProcesser{
    final static void modify(Graphics g){
        //here lies the problem.
    }
}

Ideally, the modify method would use the Graphics object as a parameter, and it would get her a bitmap or an array of bytes/int with the data drawn. Then she do all that the pixel values and then crush them to the Graphics object. Or maybe it would do all this without copying it in a bitmap/picture and just edit a graphic field directly.

I thought that it would be a way to get an article / a region which was drawn (I want my post method only affect an area of the screen), but there is no method to return the screen stretched somehow, it seems. There is no Bitmap field in class Graphics to mess with. No table with the pixel values. No getBitmap/getRegion method.

After thinking long and hard, I thought to use a sort of buffer to the screen. Have a Bitmap of the size of the screen and instead draw things on the screen, draw them on the Bitmap object, and then apply the post treatment methods he and then draws the Bitmap over together on the Graphics object... but it seems so memory intensive. Moreover, I have to use the thingies setARGB awful and messy the bitmap instead of the methods of the Graphics class Drawing.

Any advice on that? Comments? Help? Suggestions?

Just to confirm the approach of the buffer, you can create a bitmap image in the desired size, create a Graphics using the bitmap object, and then you can call 'paint' provide your own Bitmap, rather than the image of the screen image.

You can also get it current graph of the screen using . getGraphics().

Not sure this helps.  Good luck.

Tags: BlackBerry Developers

Similar Questions

  • I just installed 5 Lightroom, but cannot import photos, there is no option to import anywhere. Get the pop up saying error trying to change modules? Help with this?

    I just installed 5 Lightroom, but cannot import photos, there is no option to import anywhere. Download pop up saying error trying to change modules.

    I had this with the trial, then I bought the license and still happens.  Help with this?

    Error changing modules | Lightroom

  • How to get the active screen of the BlackBerry application?

    Hello

    I'm trying to get the active screen of the BlackBerry application, for example the home menu.

    I tried to use the screen ActiveScreen = getUiEngine () .getActiveScreen () in my code, but found error during execution.

    I know that this is because the getActiveScreen() method applies only for screens created by this application.

    So is there a way to capture the screen of the other application, for example the mail filter BlcackBerry?

    Thank you.

    Not wanting to not to repeat me, but there is no general way to get access to the Screen of another application object, unless you are on good terms with this application - which basically means that you have access to the instance UiApplication.  You cannot ask the operating system to get that to you, you must have a way to get you.  Which implies execution of something in the context of the Application.

    Even in this case, you may not be able to do what you want.  You will probably need to iterate over the screen and content managers and find the field you want, and even if it covers anything you understand (like BasicEditField) it still cannot handle standard things like setText in a way that is useful to you.  And you might not find fields you recognize, if you access a browser screen, I think you'll find there \are RIM not standard fields in there, so there is nothing you can interact from a standard application of the RIM.

    If you want to do this kind of treatment in General, that will deal with in a number of applications, you should watch event Injection.

    There may be other options for specific applications.  For example, you can simulate of electronic mail by writing a program that sends an email, rather than interact with the BlackBerry.  Or for the same application, if you try to test the headphones, then the listener has access to the UiApplication.  Aye, we be able to help you find approaches less General in some places, if we understand what you're trying to do.  This is the reason for the specific question that I asked in my last post.

    Regarding your second question

    "Another question is, can two separate applications of myself interaction by the user interface?

    For example, to call app2. ButtonField.click () or something. »

    It is in fact just an extension to your first question.  The difference is that you will find the UiApplication associated if both applications are on good terms, in fact you can "spend" the UiApplication via a Global event.  Once you have the UiApplication, you can use

    .invokeLater (...)

    to run the user interface code in the other Application.

    But I look at injector event because I think it might be a more general solution.

  • Installed the network updated drivers hp support page now I get the blue screen of death

    Installed the network updated drivers for my laptop hp support page and now I get the blue screen of death a few minutes of Internet usage.

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?OS=4063 & LC = on & CC = US & DLC = in & sw_lang = & Product = 5171...

    I can reboot the computer, but it only works for a little bit before again becoming the blue screen.

    I tried to download and reinstall the hp 8 drivers network twice now. (Product number: QJ793AV-#ABA)

    I am running windows 7 (x 64) and downloaded all the updates as well.

    Any help would be greatly appreciated.

    I made an another windows update and seems to be ok for now

  • I get the blue screen of death, I do before going to the Geek squad?

    I get the blue screen of death, I then close my pc and restart in safe mode and then trouble shoot. I can then restart normally and then it is fine for awhile. I don't always have to be on the internet to get the blue screen. I have AVG and super anti-spy ware and run full scans and they say that there are no threats. So what else can I try?

    Messages you receive when you restart the computer, more a review of the event viewer should help you determine what is causing the BSOD.  The BSOD is not necessarily related to malicious software.

    You have posted in the forum for the forum of anti-malware for Microsoft Security Essentials (MSE).  Since you're using AVG, your post is off-topic for this forum.

    You can expect from a forum moderator move your message or if you want to, you can seek assistance in search and/or post in the appropriate Forum Windows:

    http://answers.Microsoft.com/en-us

    Kind regards...

  • Get the blue screen when you create a new message or the response message in OWA Exchange 2007

    Get the blue screen when you create a new message or the response message in OWA (Exchange 2007)

    Hello

    I suggest you post the question in the forums and check them off below if it helps:

    http://social.technet.Microsoft.com/forums/en-us/exchangesvrclients/

    It will be useful.

  • Recent upgrades: KB2419640, KB976902, KB890803 when installed I can't start and get the blue screen.

    After that the installation of upgrades KB2419640, KB976902, KB890803 I'm unable to boot.  I get the blue screen.  I used chkdsk, memtest etc. No problem.  I disabled the upgrades to prevent settling.   I'm not comfortabel thereby.  Is there a solution?

    You are able to boot mode safe? If you can, do and run System Restore:

    To access the system recovery environment in Windows 7, simply start your PC, just before the system loads the Windows operating system. Press the [F8] key function 8 on your keyboard which will launch the menu Advanced Boot Options. You will see a new option 'Safe Mode', select this option and press 'Enter' on your keyboard.

    System Restore -Windows 7 features - Microsoft Windows

    After you're booted in Normal mode, click Start, all programs > Windows Update

    Check for updates, now updates you're experience problems with, each of them right click and click "hide update".

    If they are updated driver in particular, do not install them, hide them instead, any update of the driver offered, instead of this download directly from the manufacturers Web site.

    HowManage , Configure and troubleshoot Windows updates releasing it's easy: with Windows | ActiveWin | Laptops | Microsoft MVP

  • I get the blue screen error - error - Stop 0X0000008E

    -Stop error 0X0000008E (0xC00005, 0XC000005, 0X08244c8b, 0XBA50B58C, 0 X 00000)

    Hi I get the blue screen error - error - Stop 0X0000008E (0xC00005, 0XC000005, 0X08244c8b, 0XBA50B58C, 0 X 00000) and cannot use the pc in safe mode. I have XP - OS. I really don't want to reformat the HARD drive and you want to avoid reinstalling as much as possible

    Hi aromaveda,

    ·         Have you made changes on the computer?

    Follow these methods.

    Method 1: Follow the steps in the article.

    You receive a random "0x0000008E" error message on a blue screen in Windows XP

    http://support.Microsoft.com/kb/827663

    Method 2: Follow these steps:

    Step 1: Start the computer in safe mode and check if the problem persists.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Step 2: If the problem does not still in safe mode, perform a clean boot to see if there is no conflict of software like clean boot helps you eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

    Method 3: Follow the steps in the article to check the drive for errors.

    How to perform disk error checking in Windows XP

    http://support.Microsoft.com/kb/315265

    Note: If bad sectors are found in the hard drive, then it could try to fix this particular sector. If you have any data on that, it can get lost.

  • get the blue screen for video ati3duag.dll and also 0x000008E (0xc0000005), 0xBF0C8855.

    ERROR MESSAGE
    I get the blue screen for video: ati3duag.dll, BFO72000, time stamp 33fb6e2af. How to find & fix the problem? Speak not disable bios memory.

    Also I get: 0x000008E (0xc0000005), 0xBF0C8855.
    This happens when I want to watch a video.


    I use windows XP Home Edition

    Thank you
    Laurie

    I guess you have a problem with
    your video driver. You may want to update or
    It may have been a version that your
    hardware has problems with.

    Do a restore of the system in Mode safe for a time
    before the problem started, may be worth a try.

    See the following articles:

    (306084) how to restore Windows XP to a
    previous state
    http://support.Microsoft.com/?kbid=306084

    How to restore a Windows XP system to a previous state using system restore
    http://bertk.MVPs.org/

    (315222) a Description of the Safe Mode
    Boot into Windows XP options
    http://support.Microsoft.com/?kbid=315222

    How to start safe mode in Windows XP
    http://bertk.MVPs.org/html/SafeMode.html

    Good luck...

  • I get the blue screen error that says CONFIG_LIST_ failed

    I get the blue screen error that says CONFIG_LIST_ failed with the error stop

    0 x 00000073 (0xc000017D, 0 x 0, 00000001 00000001, 0xF90EEBB8)

    and no FAILURE, but also last Config mode. are not able to enter either. PS my CD rom drive has been inoperative for a long time so can't use reinstall disk

    and available good PC has no floppy. Can I use a flash drive to copy all the files needed XP recommended installation. disc?

    Hi philadel37,

    Unfortunately, you can not use the flash drive to restore system files or to solve this problem.

    You will need to use the Windows XP installation disk to perform a repair of Windows XP installation.

    See the article for more information about the Windows XP repair installation.

    How to fix a computer that does not start

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/how-to-fix-computer-that-will-not-start

  • Virus deleted and now the computer will not start... I get the blue screen with an error that says STOP: 0x0000007B (0xB84C3524, 0xC000000E, 0x00000000, 0x00000000) what is the problem? !!

    Virus deleted and now the computer will not start... I get the blue screen with an error that says STOP: 0x0000007B (0xB84C3524, 0xC000000E, 0x00000000, 0x00000000) what is the problem? !!

    Hi ipitedafoo,

    You can check if this article helps.

    Advanced troubleshooting of errors "Stop 0x0000007B" in Windows XP

    See also:

    Error message "STOP 0x0000007B" when you restart your Windows XP-based computer

  • I have no welcome screen. How can I get the Welcome screen?

    I am running XP Home Edition.  When I turn on the computer, I get only a window where I can type the user and password, but do not get the Welcome screen I'm used on other computers I use XP.  I want the screen which shows each user next to a small table, where choose you one to connect.  I also can't get there in the menu START.  If I click START, then click on LOG OFF, I don't get the option to SWITCH USERS that would take me to the screen of welcome as well.  If I open the control PANEL and click USER ACCOUNTS, I can't find a prompt which is supposed to say "change the way users Log On.  It comes to have I'm supposed to find a checkbox indicating "use the Welcome screen.  Is not an option for this version of XP?  Am just missing something?  Help, please!

    Hello clay Spinner

    Try this and see if this helps you

  • I uninstalled the touchsmart from hp on vista and then tried the system restore, dad will kill me, how can I get the touch screen to work again?

    I uninstalled the touchsmart from hp on vista and then tried the system restore, dad will kill me, how can I get the touch screen to work again?

    Hello

    You have a specific question for HP, it may be better if you ask in the Forums of HP's Support.

    http://h30434.www3.HP.com/

    See you soon.

  • My system crashed and now I just get the blue screen that says to reinstall windows, when I try to use my recovery disks that it won't work.

    Is there anywhere to get a new copy of the system recovery disc for my windows vista computer.  I have a HP Pavillion and I get not anywhere when trying to start repair, it tries to fix my computer and takes forever... and then I get the blue screen saying I need to reload windows.  The recovery discs that I burned when I bought the computer do not work.  What are my options?

    How to reinstall Vista

    Contact the manufacturer of the laptop computer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    also ask them if you have a recovery partition on your hard drive to get back to the way you bought

    you would normally press F8, F9, F10 or F11 or Alt + F10 or 0 to start to start the recovery process according to the manufacturer

    Ask them of the exact key sequence

    With HP normally press you F11 at startup to start the process of recovery from the recovery partition

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

    How to replace Microsoft software or hardware, order service packs and replace product manuals

    http://support.Microsoft.com/kb/326246

    If the problem persists with the recovery process, contact HP

    http://welcome.HP.com/country/us/en/contact_us.html

    or try HP support froums

    http://h30434.www3.HP.com/

  • Windows Vista crashes, I get the 'Blue screen of Death' and I have to restart. Different errors each time it crashes.

    Windows Vista crashes, I get the 'Blue screen of Death' and I have to restart. Different errors each time it crashes. I tried to reinstall vista without success of the problem being fixed

    Hello

    Look in the Event Viewer to see if something is reported on those.
    http://www.computerperformance.co.UK/Vista/vista_event_viewer.htm

    MyEventViewer - free - a simple alternative in the standard Windows Event Viewer.
    TIP - Options - Advanced filter allows you to see a period of time instead of the entire file.

    http://www.NirSoft.NET/utils/my_event_viewer.html

    -------------------------------------------------------------------------
    Also this, so you can see the probable bluescreens.

    Windows Vista restarts automatically if your computer encounters an error that requires him to plant.
    http://www.winvistatips.com/disable-automatic-restart-T84.html

    -------------------------------------------------------------------------

    Here are a few ways to possibly fix the blue screen issue. If you could give the info from the blue screen that would be
    Help. Such as ITC and 4 others entered at the bottom left. And any other information such as STOP error
    codes and info like IRQL_NOT_LESS_OR_EQUAL or PAGE_FAULT_IN_NONPAGED_AREA and similar messages.

    As examples:

    BCCode: 116
    BCP1: 87BC9510
    BCP2: 8C013D80
    BCP3: 00000000
    BCP4: 00000002

    or in this format:

    Stop: 0 x 00000000 (oxoooooooo oxoooooooo oxoooooooo oxooooooooo)
    Tcpip.sys - address blocking 0 x 0 00000000 000000000 DateStamp 0 x 000000000

    It is an excellent tool for displaying the blue screen error information

    BlueScreenView scans all your minidump files created during "blue screen of death," collisions
    Displays information on all the "crash" of a table - free
    http://www.NirSoft.NET/utils/blue_screen_view.html

    BlueScreens many are caused by old or damaged drivers, video drivers in particular, but there are other causes.

    You can follow these steps in the Safe Mode if necessary or the command prompt Vista DVD or Options of recovery if your
    system installed by the manufacturer.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    You can try a system restore to a point before the problem started when one exists.

    How to make a Vista system restore
    http://www.Vistax64.com/tutorials/76905-System-Restore-how.html

    -------------------------------------------------------------------------

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    The log can give you the answer if there is a corrupted driver. (Says not all possible driver problems).

    Also run CheckDisk, so we cannot exclude as much as possible of the corruption.
    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -------------------------------------------------------------------------

    Often drivers up-to-date will help, usually video, sound, network card (NIC), WiFi, 3rd party keyboard and
    smile, as well as of other major device drivers.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    -------------------------------------------------------------------------

    How to fix BlueScreen (STOP) errors that cause Windows Vista to shut down or restart unexpectedly
    http://support.Microsoft.com/kb/958233

    Troubleshooting, STOP error blue screen Vista
    http://www.chicagotech.NET/Vista/vistabluescreen.htm

    Understanding and decoding BSOD (blue screen of death) Messages
    http://www.Taranfx.com/blog/?p=692

    Windows - troubleshooting blue screen errors
    http://KB.wisc.edu/page.php?id=7033

    -------------------------------------------------------------------------

    In some cases, it may be necessary.

    The Options or Vista recovery disk Startup Repair

    How to do a startup repair
    http://www.Vistax64.com/tutorials/91467-startup-repair.html

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

Maybe you are looking for

  • Need driver sound for Satellite A65

    Had to not reinstall OS now now no sound... checked and found this driver is missing and can't find it.If someone can help a lot...

  • Deleting messages from blackBerry 8120 Smartphones

    Hello I had my 8120 for 9 months and never had a problem with it until now. For some reason any it deletes all the messages of my text in itself, even when there is not a lot in my entry or exit box... Also deletion of some history on my Facebook app

  • Cisco ISE comments Portal - DNS problem - External area

    Hello I have a client that has the following sceanrio: In a wireless deployment and deployment Cisco ISE 1.1.3 with CWA, when the wireless client receives the URL ISE redictect (URL to access the portal of ISE comments), this URL is based on the ISE

  • Install the cartridge from the command line

    All, The problem, I am trying to solve right now is automated synchronization on all my servers cartridges. That said, is there a doc to install cartridges on a FMS from the command line? I don't see to be able to find anything. Thank you!

  • Facebook for the Visio

    Since I've upgraded win 8 pro 8.1, I'm no longer can use my videocall on facebook. How to fix? I tried compitable with win 8 by chrome properties, re - install videocall app, etc. but still no use.