Can we use fill for images???

All
Had a question regarding changing images dynamically.
Here's my requirement .I have an image and i need to change the color of the image dynamically when the user select different colors from the color pallete.
I don't want to create have like 100 images and use those based on what the user selected.
Can we achieve this in javaFX where i fill the image with a different color .Something like how we would use the "fill" attribute for circles and rectangles to fill in colors.
Please help me out.
Thanks

You can also use Blend, it works well to colorize black & white images, for example.
I played a bit with rakeshmenonp's code:
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.image.*;
import javafx.scene.effect.*;
import javafx.scene.Group;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.layout.*;
def img = Image {
    url: "file:///E:/Documents/Perso/Images/KM200.png"
def imageViewCA = ImageView {
    image: img
    effect: ColorAdjust {
        brightness: 0.0 // -1 to 1
        contrast: 1     // 0.25 to 4
        hue: -0.7       // -1 to 1
        saturation: 1.0 // -1 to 1
def imageViewBL = ImageView {
    image: img
    effect: Blend {
        mode: BlendMode.SCREEN
        topInput: Flood {
            paint: Color.BLUE
            width: img.width
            height: img.height
def imageViewOrig = ImageView {
    image: img
def imageGroup = Group {
    content: [
        ImageView {
            image: img
        Rectangle {
            opacity: 0.5
            fill: Color.RED
            width: img.width
            height: img.height
Stage {
    scene: Scene {
        content: [
            Tile {
                columns: 2
                content: [ imageViewOrig, imageViewCA, imageViewBL, imageGroup ]
}

Similar Messages

  • The error that I am getting is this "Time Machine can't use the disk image because it can't be written to."  Any ideas on the fix for this?

    The error that I am getting is this "Time Machine can't use the disk image because it can't be written to."  Any ideas on the fix for this?  When I go to the Time Capsule my Macbook Pro shows that it is locked, I think I did something wrong, but can't figure how to unlock it to see if that fixes it.

    As far as we know, Time Machine cannot write to a disk image. It needs to write directly to the Time Capsule disk.

  • Can you use wallpapers for the icons on the iphone 3g? If so, How

    Can you use wallpapers for the icons on the iphone 3g? If so, How

    On the Mac to save a picture from a web page <CTRL> click on the picture then choose Save Image As... and save it onto the desktop. Once you have collected all your pictures onto the desktop open iPhoto and Import all the images into an iPhoto Album. Quit iPhoto.
    Open iMovie, then go to the Toolbar along the right side of the iMovie window and click on the camera icon to browse through your iPhoto Library. Find your pictures then drag them into the Project Browser window.

  • Can I use Photoshops example images on my companies web site?

    On the Photoshops CD, there is a lot of example images, Can I use these example images on my companies web site?

    Here's the process to roll back:
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, download and save Firefox 3.6 to your desktop for future installation. http://www.mozilla.com/firefox/all-older
    Close Firefox 4.
    You could install Firefox 3.6 over it (many have reported success) or you could uninstall Firefox first. If you uninstall, do not remove your personal data and settings, just the program.
    Unless you have installed an incompatible add-on, Firefox 3.6 should pick up where you left off. If there are serious issues, please post back with details.
    Note: I haven't actually tried this myself!
    Does that resolve the NASA issues?

  • Time Machine can't use the disk image because it can't be written to.

    Time Machine can't use the disk image because it can't be written to. help!

    VictorSMiller wrote:
    I just started getting the same message.  I'm using a Western Digital My Book 3TB disk.  Normally I have the backups done with the disk attached to Airport Extreme.
    I hate to have to tell you this, but backing-up that way is unreliable and not supported by Apple.   See:  Using Time Machine with an Airport Extreme Air Disk.
    Backup failed with error: The target disk image volume is read-only.
    Most likely, you got this message before all this started:
    What that doesn't explicity say is, the backups failed the verification.  When that happens, Time Machine marks the sparse bundle as damaged and won't back up to it anymore (even if Repair Disk can't find the problem).  See #C13 in Time Machine - Troubleshooting for details.

  • How can I use TopLink for querys that have two and more tables?

    I use TopLink today, and I can use one table to query, but how can I use TopLink for querys that have two and more tables?
    Thank you for see and answer this question.

    You can write a custom SQL query and map it to an object as needed. You can also use the Toplink query language "anyOf" or "get" commands to map two tables as long as you map them as one to one (get command) or one to many (anyOf command) in the toplink mapping workbench.
    Zev.
    check out oracle.toplink.expressions.Expression in the 10.1.3 API

  • How can I use OCCI for oracle8.1.6?

    my database is oralce8.1.6 for solaris8.
    I want to develop database application by OCCI .
    But only oracle9i has OCCI.
    How can I do?
    Where can I get OCCI ,and how can I use it for oralce8.1.6?
    thank you very much!!

    OCI is available for all versions of Oracle including Oracle
    7/8/8i etc. However it is not installed by default with these
    versions. I am assuming that the default 9i installation
    includes OCI. You should be able to install OCI for other
    versions through one of the development platforms e.g. ProC/C++
    etc.

  • How can i use AME for the new OAF page.

    Dear all,
    I have developed a new OAF page and registered under Employee Self Service.
    How can i use AME for the approval process.
    Appreciate your ideas?
    zamora

    I will try to answer based on my experience of working with iProcurement and AME. It depends on how you want to make a call to AME , directly from OAF Page or from Workflow and your requirement. You didn't specify what you want to show the users on OAF Page and your business requirement.
    Before calling AME Engine from the OAF page or workflow, I guess you did already setup AME Transaction Type and it's Approval Groups, Conditions, Action Types and Rules. Do some testing from AME Business Analyst Test Workbench. Please note that, AME provides lot of PL/SQL API's that you have to call from your programs (java or workflow pl/sql)
    Let's look at the workflow and putting an OAF Page as notification.
    As Sameer said, you have kick-off workflow process from PR of CO and with in the workflow function, you make a call to AME Engine API's with the AME Transaction ID. This transactionId belongs to the AME Transsaction Type that you setup. Based on the rules setup, AME Engine generates list of approvers/approver and stores them AME Tables for that transactionId. Then, it sends a notification to the approver.
    In the workflow, where that notification is defined, in the message body you have to put an attribute(&XX_WF_FWK_RN) of type document/send. And this attribute will have the constant JSP:/OA_HTML/OA.jsp?OAFunc=XX_FUNC&paramId=-&DOCUMENT_ID-. This function is SSWA Jsp function that makes a web html call to your OAF Region.
    If your requirement is to just show the list of approvers on the OAF Page, you may have to call AME API diectly passing your AME TrasnactionId with other parameters. Then AME generates list of approvers and stores them in AME tables with each approver status. You can pickup those approvers using VO and show them on OAF Page.
    Hope this gives some idea.

  • How can i use RTFEditorKit for JTextField.

    hi all,
    how can i use RTFEditorKit for JTextField.
    thanks in advance
    daya

    Don't cross post. This is a Swing related question and you have already posted in the Swing forum:
    http://forum.java.sun.com/thread.jspa?threadID=619619&tstart=0

  • How can I use Siri for IPhone?

    How can I use Siri for IPhone?

    Siri only works on the iPhone 4S or iPhone 5. If you have one of those devices, turn it on in Settings > General > Siri.
    If you need more info than that, ask in the Apple forums.

  • How can I use music for ringtones on my iphone 4?

    How can I use music for ringtones on my iphone 4?

    You can take any MP3 file that it 40 seconds or less and change the file extension to M4R. Then drag it into iTunes. It will appear under Ringtones and transfer over next time you sync,

  • I have an apple id but ı can not use it for sign in to itunes connect account while publishing my ibook document. Why ı can not login? What can ı do to figure out this problem?

    I have an apple id but ı can not use it for sign in to itunes connect account while publishing my ibook document. Why ı can not login? What can ı do to figure out this problem?

    As note already on the iBA forum [ AppleID for ibooks publishing ], you need two IDs. You can't use your developer ID.
    If you already signed up for books with that ID, you need to talk to Apple to straighten things out.

  • Can I use iCloud for backup?

    Can I use iCloud for backup?

    To back up all your data you are better off getting an external hard drive.  For details on iCould, read: http://www.apple.com/icloud/.

  • I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents?

    I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents? I am planning to transition to a Mac so using the iCloud seems to make the most sence.

    No, it is not a backup method at all.  If you delete a sync'd file on any device, you delete it permanently from iCloud.  That by its very essence is not a backup solution therefore.  A backup solution does not automatically and simultaneiously delete the file everywhere when it is deleted from the original source.
    iCloud is strictly a syncronization tool for using files on multiple internet connected devices.

  • Can i use iCloud for pages documents iMac?

    can i use iCloud for pages documents iMac?

    Hi lmdavis72,
    It looks like you can.
    From "iCloud: Documents in the Cloud overview"
    You can download a document from icloud.com/iwork to your Mac or Windows computer, edit it, and then drag the revised version to icloud.com/iwork. It’s then automatically updated on all of your iOS devices. You can also drag an iWork ’09 (Keynote, Pages, and Numbers) or Microsoft Office (PowerPoint, Word, and Excel) document created on your computer to icloud.com/iwork.
    So it looks like it can go between iOS devices and your iMac.
    ivan

Maybe you are looking for

  • Problem compiling apache (2.4.4) with openssl 1.0.1e

    Hi Experts i am struggling since last 2 weeks to compile apache2.4.4 with openssl 1.0.1e on sun spark server. System Details: SunOS hostname 5.10 Generic_147440-19 sun4v sparc SUNW,Sun-Blade-T6320 bash-3.00# cat /etc/release Oracle Solaris 10 8/11 s1

  • Kernel startup failure and timeout error during J2EE startup

    We are working on getting a DR (Disaster recovery) instance of EP6.0 started up after a restore from an offline backup of our Production Portal. This is on a separate piece of hardware. This is the J2EE version 6.2 and Ep 6.0 Sp2 Patch 37. This versi

  • Fill Multiline container from multi records in source XML ?

    Hi, scenario: File-XI-RFC-File(BPM). Read company id from source file, call BAPI(company_get_detail) using RFC receiver adapter and then write response to another file. This works fine for one record(one RFC call to BAPI) using the BPM. Now, I would

  • How to prevent users from customizing KMs?

    Hi, I have users with CONNECT and DESIGNER profiles assigned to. How to drop out "customize KMs" rights? Thanks

  • Report Template and Images

    In my report(6i) template I would like to create an image object that could be dynamically set depending on a user parameter. The image object would be retrieved from a BLOB column in the database. Is there any way this can be done? Thanks in advance