I need help to store images in database

hi,
at present i am working in oracle, i need one help.
i want to create one directory in c:\drive and i have to store and retreive my images in that directory.i want to do in oracle only,i am not using any front end. i need coding for that,please give me coding to do that.first i have to store that images in my table.that image is in my desktop,how to call that image and how to store that image in my table and how to store that image in that directory. please give coding and ideas for that,help meeeeeeeeeeeeee.

You need to create a oracle directory which will point to the physical directory where picture or image file lies...
For this you need create directory privillege
Once you create the oracle directory..
Please see my sample try
create table sample_bfile(id number,photo bfile);
insert into sample_bfile values (1,bfilename('<oracle_dir_name>','<file_name>');
This will insert into the reference of the image in the column...
But you cant select this column in sqlplus which u might be knowing...
Then you can access the image with the front end
Regards,
Shasi

Similar Messages

  • How to store images in database and retrieve them back to page?

    Well I don't know how to store an image file to a database (say MSSQL) from the JSP and retrieve it back whenever needed and put it on the JSP page? Please help me.

    I am not sure how to store images in database but what you can do is store the image into particular folder using FileOutputStream and its unique name into the database...and than retrieve it from the folder using that name retrieved from database...
    <%
    response.setContentType("text/html");
    response.setHeader("Cache-control","no-cache");
    String err = "";
    String lastFileName = "";
    String contentType = request.getContentType();
    String boundary = "";
    final int BOUNDARY_WORD_SIZE = "boundary=".length();
    System.out.println("contentType --> "+contentType);
    System.out.println("BOUNDARY_WORD_SIZE --> "+BOUNDARY_WORD_SIZE);
    if(contentType == null || !contentType.startsWith("multipart/form-data"))
    err = "Ilegal ENCTYPE : must be multipart/form-data\n";
    err += "ENCTYPE set = " + contentType;
    else
    boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
    System.out.println("boundary --> "+boundary);
    boundary = "--" + boundary;
    try
    ServletInputStream sis = request.getInputStream();
    byte[] b = new byte[1024];
    int x=0;
    int state=0;
    String name=null,fileName=null,contentType2=null;
    java.io.FileOutputStream buffer = null;
    while((x=sis.readLine(b,0,1024))>-1)
         System.out.println("************ x ********** "+x);
         String s = new String(b,0,x);
                   System.out.println("************ s ********** \n"+s);
         if(s.startsWith(boundary))
         state = 0;
         System.out.println("name="+name);
         System.out.println("filename="+fileName);
         name = null;
         contentType2 = null;
         fileName = null;
         else if(s.startsWith("Content-Disposition") && state==0)
              System.out.println("-- 1 --");
              state = 1;
              System.out.println("s.indexOf(filename=) --> "+s.indexOf("filename="));
              if(s.indexOf("filename=") == -1)
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
                   System.out.println("after name substring 1 "+name);
              else
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
                   System.out.println("after name substring 2 "+name);
                   fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
                   System.out.println("fileName --> "+fileName);
                   //String fileName1 = s.substring(s.indexOf("filename=") + "filename=".length(),s.length());
                   //System.out.println("fileName1 -->"+fileName1);
                   if(fileName.equals("\"\""))
                   fileName = null;
                   else
                        String userAgent = request.getHeader("User-Agent");
                        System.out.println("userAgent --> "+userAgent);
                        String userSeparator="/"; // default
                        if (userAgent.indexOf("Windows")!=-1)
                        System.out.println("test --> "+"\\");
                        userSeparator="\\";
                        if (userAgent.indexOf("Linux")!=-1)
                        userSeparator="/";
                        System.out.println("userSeparator "+userSeparator);
                        System.out.println("fileName before inserting userSeparators "+fileName);
                        fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
                        System.out.println("fileName after userSeparators "+fileName);
                        if(fileName.startsWith( "\""))
                        fileName = fileName.substring( 1);
              name = name.substring(1,name.length()-1);
              System.out.println("name 2 --> "+name);
              System.out.println("final file name "+fileName);
              if (name.equals("file"))
                   if (buffer!=null)
                   buffer.close();
                   lastFileName = fileName;
                   buffer = new java.io.FileOutputStream("/Documents and Settings/sunil/Desktop/images/"+fileName);
         else if(s.startsWith("Content-Type") && state==1)
                             System.out.println("-- 2 --");
              state = 2;
              contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
              System.out.println("contentType2 --> "+contentType2);
         else if(s.equals("\r\n") && state != 3)
                   System.out.println("-- 3 --");
              state = 3;
         else
              System.out.println("-- 4 --");     
              if (name.equals("file"))
              System.out.println("Final x :: "+x);     
              buffer.write(b,0,x);
    }     // while closing
    sis.close();
    buffer.close();
    }catch(java.io.IOException e)
    err = e.toString();
    boolean ok = err.equals("");
    if(!ok)
    out.println(err);
    else
    %>
              <SCRIPT language="javascript">
              history.back(1);
              alert('Uploaded <%=lastFileName%>');
              window.location.reload(false);
              </SCRIPT>
    <%
         out.println("done");
    %>
    </BODY>
    </HTML>
    I think it will solve ur problem..

  • How to store images in database using java

    hii
    how to store images in database using java..........
    Message was edited by:
    naveennaga

    I asked a similar question once and the answer I got was - Don't.
    Instead, store the images on a drive somewhere and store the path in the database.
    But I'm no expert - that's just what I was told by someone who does this kind of stuff a lot.
    Hope that helps.

  • How to store images in database

    Can anyone help me with storing images in database, problem with me is that i m designing a site in which u need to display product information and administrator can add and delete products. now how can i make that administrator can add a image to database, Can u tell me that can image itself can be stored in a database or just the path of it can be stored in a database.
    Waiting for quick reply,
    thanks

    can u plss tell me how to store the path of the image in database , do we just have to mention it as varchar field and write the path thats it or do we have to do anything else . and pls also tellme when do we have to set connections ? only at the time to retrieving the images since we are not uploading the image sin DB just mentioning their path . pls reply ASAP

  • How t store images in database

    hi
    i want coding to store images,files in database

    hi,
    You can use the BLOB data type provided by oracle to store images in the database. BLOB (Binary Large Object). To Store data into the table, we need to use the DBMS_LOB package to manipulate the data and then store it in the table.
    BFILE are used in combination with the BLOB to get the images into the database.
    Thanks, VIkram

  • I need help dividing an image into two equal parts in Adobe Illustrator CC--ASAP!!!

    I need help dividing a single, already created image into 2 equal parts...Am getting nowhere so far

    Hi Willi, thanks so much for responding! Below is the image I need to divide in half. The left half where it says "Click here for the definition" links to a landing page where people can read the definition of the Hebrew Word. The right half links to an audio recording of the Hebrew word being spoken aloud. I am trying to figure out how to use the scissors or knife tool in Adobe Illustrator and am having no luck. Plus I believe there's a way to include URLs on each separated part, but I can't get past figuring out how to cut it. My background is not graphic design

  • Need help [JS]: select images/captions in InD, switch to Bridge and write to XMP

    I've got a javascript for CS3/Tiger that I'm writing that eventually will let a user select an image and a caption in InDesign, then tells bridge to write the caption data into the image metadata. I need help - the script works in pieces, but not when put together.
    It's built as an indesign script, then follows the procedure to create a script object to send to bridge. When it runs, the indesign portion works fine, but nothing happens in bridge.
    The script is below, with comments.
    Can someone help!? Thanks.
    // This is the InDesign portion of the script, which was tested separately and is working fine. Right now, for testing purposes, the data from this portion isn't even used by the later Bridge portion but once I get the bridge part together, it will use those variables.
    #target "indesign-5.0"
    var myObjectList = new Array;
    //Script does nothing if no documents are open or if no objects are selected.
    if(app.documents.length != 0){
    if(app.selection.length != 0){
    for(myCounter = 0; myCounter < app.selection.length; myCounter ++){
    switch(app.selection[myCounter].constructor.name){
    case "TextFrame":
    var myCaption = app.selection[myCounter].contents;
    $.writeln(myCaption);
    break;
    default:
    var myLink = app.selection[myCounter].graphics[0].itemLink.filePath;
    $.writeln(myLink);
    // here's where I create the string of the script to send to Bridge.
    // the script itself is almost completely a lifted from the SnpModifyMetadta sample from the Bridge sdk
    // it basically finds a certain image file and modifies the description metatata. i hardcoded the caption text and image path just for testing- eventually i would like it to use the variables from indesign.
    // this script works fine as-is when run in the original Bridge scripting context.
    // the method here of concatenating and sending the myScript string works fine when i use a different (smaller) script. so i can't tell why it's not working!?
    var myScript = "function SnpModifyMetadata()";
    myScript += "{";
    myScript += " this.requiredContext = \"Needs to run in Bridge, \nwith a selection of a file, \nideally with some metadata\";";
    myScript += "}";
    myScript += "SnpModifyMetadata.prototype.run = function()";
    myScript += "{";
    myScript += " if(!this.canRun())";
    myScript += " {";
    myScript += " return false;";
    myScript += " }";
    myScript += " if( xmpLib == undefined )";
    myScript += " {";
    myScript += " if( Folder.fs == \"Windows\" )";
    myScript += " {";
    myScript += " var pathToLib = Folder.startup.fsName + \"/AdobeXMPScript.dll\";";
    myScript += " }";
    myScript += " else";
    myScript += " {";
    myScript += " var pathToLib = Folder.startup.fsName + \"/AdobeXMPScript.framework\";";
    myScript += " }";
    myScript += " var libfile = new File( pathToLib );";
    myScript += " var xmpLib = new ExternalObject(\"lib:\" + pathToLib );";
    myScript += " }";
    myScript += " $.writeln(\"About to run SnpModifyXML\");";
    myScript += " var thumb = new Thumbnail(Folder(\"/Macintosh HD/Users/hearstuser/Desktop/BridgeScriptImages/orion_stack copy 6.psd\"));";
    myScript += " if(thumb.hasMetadata)";
    myScript += " {";
    myScript += " var md = thumb.synchronousMetadata;";
    myScript += " var xmp = new XMPMeta(md.serialize());";
    myScript += " $.writeln(\"SnpModifyXML: About to modify XMP data for \" + thumb.name);";
    myScript += " $.writeln(\"XMP packet before modifications:\");";
    myScript += " $.writeln(\"-------------------------------------------------\");";
    myScript += " $.writeln(xmp.dumpObject());";
    myScript += " xmp.deleteProperty(XMPConst.NS_XMP, \"Description\");";
    myScript += " xmp.setProperty(XMPConst.NS_XMP, \"Description\", \"hoThereHeyThere\");";
    myScript += " var d = new XMPDateTime(new Date());";
    myScript += " d.convertToLocalTime();";
    myScript += " xmp.setProperty(XMPConst.NS_XMP, \"ModifyDate\", d, XMPConst.XMPDATE);";
    myScript += " $.writeln(\"XMP packet af

    Recently I received an e-mail from a user asking me to remake the script I had posted here a while ago.
    I rechecked my previous post and found a couple of serious mistakes. So I revised it according to what he asked. Each page in his InDesign document contains one image and one text frame with description.
    At start the script checks the selection. If nothing is selected it processes all pages in the document. In case two objects are selected – it checks whether one of them text frame and the other a rectangle and if the rectangle contains an image, then it reads the contents of the text frame, replacing hard and soft returns with spaces and writes this text to the corresponding image’s description field.
    In the end, it updates all links and saves the file.
    The script works both on Mac and PC, assuming that CS3 installed in the default location so long as it depends on libraries:
    /C/Program Files/Adobe/Adobe Bridge CS3/AdobeXMPScript.dll (on PC)
    /Applications/Adobe Bridge CS3/Bridge CS3.app/Contents/MacOS/AdobeXMPScript.framework (on MAC)
    So, if necessary, correct these lines.
    Here is my script in case somebody is interested:
    #target indesign
    var myDoc = app.activeDocument;
    var mySelection = app.selection;
    if (mySelection.length == 0) {
        ProcessPages();
    else if (mySelection.length == 1) {
        alert("One image and one textframe should be selected.");
        exit();   
    else if (mySelection.length == 2) {
        try {
            if (mySelection[0].constructor.name == "TextFrame" && mySelection[1].images.length == 1) {
                var myTextFrame = mySelection[0];
                var myImage = mySelection[1].images[0];
                var myCaption = ReplaceReturnWithSpace(myTextFrame.contents);
                var myPath = new File(myImage.itemLink.filePath).absoluteURI;
            else if (mySelection[1].constructor.name == "TextFrame" && mySelection[0].images.length == 1) {
                var myTextFrame = mySelection[1];
                var myImage = mySelection[0].images[0];
                var myCaption = ReplaceReturnWithSpace(myTextFrame.contents);
                var myPath = new File(myImage.itemLink.filePath).absoluteURI;
        catch(e) {
            alert("Something wrong with your selection.\nError: " + e.message);
            exit();
        CreateBridgeTalkMessage(myCaption, myPath);
    else if (mySelection.length > 2) {
        alert("One image and one textframe should be selected.");
        exit();
    UpdateAllOutdatedLinks();
    myDoc.save();
    alert("All done.");
    //+++++++++++++++++++ FUNCTIONS ++++++++++++++++++++++
    function CreateBridgeTalkMessage(myCaption, myPath) {
        var bt = new BridgeTalk();
        bt.target = "bridge";
        var myScript = WriteCaption.toString() + '\r';
        myScript += 'WriteCaption(\"' + myCaption + '\", \"' + myPath + '\");';
        bt.body = myScript;
        bt.send();
    function WriteCaption(myCaption, myPath) {
        if( xmpLib == undefined ) {
            if( Folder.fs == "Windows") {
                var pathToLib = "/C/Program Files/Adobe/Adobe Bridge CS3/AdobeXMPScript.dll";
            else {
                var pathToLib = "/Applications/Adobe Bridge CS3/Bridge CS3.app/Contents/MacOS/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var thumb = new Thumbnail (File (myPath));
        if (thumb.hasMetadata) {
            var md = thumb.synchronousMetadata;
            var xmp = new XMPMeta(md.serialize());
            xmp.deleteProperty(XMPConst.NS_XMP, "Description");
            xmp.setProperty(XMPConst.NS_XMP, "Description", myCaption);
            var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
            thumb.metadata = new Metadata(updatedPacket);
    function ProcessPages() {
        var myPages = myDoc.pages;
        for (i = 0; i < myPages.length; i++) {
            var myPage = myPages[i];
            if (myPage.textFrames.length == 1 && myPage.rectangles.length == 1) {
                if (myPage.rectangles[0].graphics.length == 1) {
                var a = myPage.rectangles[0];
                    var myImage = myPage.rectangles[0].graphics[0];
                    var myPath = new File(myImage.itemLink.filePath).absoluteURI;
                    var myTextFrame = myPage.textFrames[0];
                    var myCaption = ReplaceReturnWithSpace(myTextFrame.contents);
                    CreateBridgeTalkMessage(myCaption, myPath);
    function ReplaceReturnWithSpace(myString) {
        myString = myString.replace( /\n/g , " " );
        myString = myString.replace( /\r/g , " " );
        return myString;
    function UpdateAllOutdatedLinks() {
        for(var myCounter = myDoc.links.length-1; myCounter >= 0; myCounter--){
            var myLink = myDoc.links[myCounter];
            if (myLink.status == LinkStatus.linkOutOfDate){
                myLink.update();
    If somebody interested in developing this script further, do not hesitate to post here your feedback.
    Kasyan

  • Need help deleting an image field/pictures in worksheet

    I am in need of help!!! Added photos in an important .pdf document (a worksheet form that was pre-made) and I added image fields (Top box photo and small bottom box for text). I need to delete some image fields now and it won't let me. I upgraded my Adobe Reader to Acrobat XI Pro trial, still can't. If I try to edit image, it says I need to have Live Cycle designer to edit this form. Someone please help! This is my son's Eagle Scout worksheet and needs to be fixed tonight....please

    If the file was created in LiveCycle Designer then it can only be edited
    there.
    It's not clear in what way you edited it originally.

  • Need help to find image size box

    I am a novice, I need to find the image size box on illistrator but not able to so please explaine how to find it on the page.  Thanks

    You may also be talking about the "Info" window. To open it, go to Window > Info or hit command+F8. It will show you the dimensions of the bounding box containing whatever object you have selected.
    Please let us know if we can help you further.

  • Need help with Applet: Images

    DUKESTARS HERE, YOU KNOW YOU WANNA
    Hi,
    I'm designing an applet for some extra credit and I need help.
    This game that i have designed is called "Digit Place Game", but there is no need for me to explain the rules.
    The problem is with images.
    When I start the game using 'appletviewer', it goes to the main menu:
    http://img243.imageshack.us/img243/946/menuhy0.png
    Which is all good.
    But I decided that when you hover your cursor over one of the options such as: Two-Digits or Three-Digits, that the words that are hovered on turn green.
    http://img131.imageshack.us/img131/6231/select1ch3.png
    So i use the mouseMoved(MouseEvent e) from awt.event;
    The problem is that when i move the mouse around the applet has thick line blotches of gray/silver demonstrated below (note: these are not exact because my print screen doesn't take a picture of the blotches)
    http://img395.imageshack.us/img395/4974/annoyingmt1.png
    It also lags a little bit.
    I have 4 images in my image folder that's in the folder of the source code
    The first one has all text blue. The second one has the first option, Two-Digits green but rest blue. The third one has the second option, Three-Digits green but rest blue, etc.
    this is my code
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.event.*;
    import java.awt.*;
    public class DigitPlaceGame extends Applet implements MouseListener, MouseMotionListener {
         public boolean load = false;
         public boolean showStartUp = false;
         public boolean[] hoverButton = new boolean[3];
         Image load1;
         Image showStartUp1;
         Image showStartUp2;
         Image showStartUp3;
         Image showStartUp4;
         public void init() {
              load = true;
              this.resize(501, 501);
                   try {
                        load1 = getImage(getCodeBase(), "images/load1.gif");
                        repaint();
                   } catch (Exception e) {}
              load();
         public void start() {
         public void stop() {
         public void destroy() {
         public void paint(Graphics g) {
              if(load == true) {
                   g.drawImage(load1, 0, 0, null, this);
              } else if(showStartUp == true) {
                   if(hoverButton[0] == true) {
                        g.drawImage(showStartUp2, 0, 0, null, this);
                   } else if(hoverButton[1] == true) {
                        g.drawImage(showStartUp3, 0, 0, null, this);
                   } else if(hoverButton[2] == true) {
                        g.drawImage(showStartUp4, 0, 0, null, this);
                   } else {
                        g.drawImage(showStartUp1, 0, 0, null, this);
                        for(int i = 0; i < 3; i++) {
                             hoverButton[i] = false;
         public void load() {
              addMouseListener(this);
              addMouseMotionListener(this);
              showStartUp1 = getImage(getCodeBase(), "images/showStartUp1.gif");
              showStartUp2 = getImage(getCodeBase(), "images/showStartUp2.gif");
              showStartUp3 = getImage(getCodeBase(), "images/showStartUp3.gif");
              showStartUp4 = getImage(getCodeBase(), "images/showStartUp4.gif");
              showStartUp();
         public void showStartUp() {
              load = false;
              showStartUp = true;
         public void mouseClicked(MouseEvent e) {
              System.out.println("test");
         public void mouseMoved(MouseEvent e) {
              int x = e.getX();
              int y = e.getY();
              if(x >= 175 && x <= 330 && y >= 200 && y <= 235) {
                   hoverButton[0] = true;
                   repaint();
              } else if(x >= 175 && x <= 330 && y >= 250 && y <= 280) {
                   hoverButton[1] = true;
                   repaint();
              } else if(x >= 175 && x <= 330 && y >= 305 && y <= 335) {
                   hoverButton[2] = true;
                   repaint();
              } else {
                        for(int i = 0; i < 3; i++) {
                             hoverButton[i] = false;
                        repaint();
         public void mouseEntered(MouseEvent e) {
         public void mouseExited(MouseEvent e) {
         public void mousePressed(MouseEvent e) {
         public void mouseReleased(MouseEvent e) {
         public void mouseDragged(MouseEvent e) {
    }plox help me ploz, i need the extra credit for an A
    can you help me demolish the lag and stop the screen from flickering? thanks!!!!!
    BTW THIS IS EXTRA CREDIT NOT HOMework
    DUKESTARS HERE, YOU KNOW YOU WANNA
    Edited by: snoy on Nov 7, 2008 10:51 PM
    Edited by: snoy on Nov 7, 2008 10:53 PM

    Oh yes, I knew there could be some problem.......
    Now try this:
    boolean a,b,c;
    if((a=(x >= 175 && x <= 330 && y >= 200 && y <= 235)) && !hoverButton[0]) {
                   hoverButton[0] = true;
                   repaint();
              } else if((b=(x >= 175 && x <= 330 && y >= 250 && y <= 280)) && !hoverButton[1]) {
                   hoverButton[1] = true;
                   repaint();
              } else if((c=(x >= 175 && x <= 330 && y >= 305 && y <= 335)) && !hoverButton[2]) {
                   hoverButton[2] = true;
                   repaint();
              } else if ((!a && !b && !c)&&(hoverButton[0] || hoverButton[1] || hoverButton[2]){
                        for(int i = 0; i < 3; i++) {
                             hoverButton[i] = false;
                        repaint();
              }hope it works........
    Edited by: T.B.M on Nov 8, 2008 10:41 PM

  • HT1923 need help itunes store not open

    i need help opening itunes store

    Does it show any errors? If not just go on the uninstaller and look for itunes and click repair. It worked for me

  • I need help editing an image in Photoshop

    I need to edit this image.
    I need to reposition the fist shape a little further down remaining within the yellow circle.  Then I also need to change all blue parts to black and the yellow outline around the knuckles to white.
    How would I do this in Photoshop?

    Put a circular selection round the fist and press Ctrl+J.
    Hide the resulting new layer and fill the circle with yellow.
    Select the blue area with the magic wand and fill the selection with black.
    Select the yellow round the fist and fill the selection with white.
    Go to the fist layer, press Ctrl+T and move it down as far as you want, (Not much room there.)
    For print, save as a TIFF; for Internet use Save for Web.

  • Need help finding moved image files

    How would I find files after they have been moved? I travel and use a MB Pro laptop. The workflow I'm using is to download images to my desktop, review, rate and add keywords immediately. I make 2 backups, 1 to portable data store hard drive and one to DVD. Then every few days I erase the desktop image files. When I arrive home I download the entire trip's images from the portable storage to my desktop drives (2 500Gb SATA drives).
    Is there an easy way to direct Aperture to look for the files in the new location? Or, failing that, is there a better way to work? I regularly have 40 - 60 Gb of images after a trip and the laptop hard drive is inadequate for the task.

    The question isn't really clear to me yet. If you know what "the new location" is, then it's easy to make Aperture point to it. But that may not be the question. I think you may need to describe your workflow in more detail.
    You don't say how to review etc images on the MBP. If you're using Aperture, it must be with a library. Are you using Managed images there? So is the problem how to transfer data -- images and edits and metadata -- from the library on the MBP to the library (with referenced images??) on the desktop?
    Synchronizing libraries is not something Apple makes easy or offers any real help with. The best way to do it turns out to be to export one project at a time, connect to the other machine and its library, and import the projects. (In the process you might also Relocate images to make them referenced.)
    But your note about the laptop drive being to small is confusing. I don't see where your images are when you're on the road.

  • Need help cutting out images

    Hey
    I realize what Im asking for might be complicated. But any
    help or direction I can get will be appreciated.
    I want to right something that will take a photo realistic
    image, say maybe a 400x300 photo of anything really, and cut out
    peices of the photo, so that I can manipulate these peices after.
    For example...if its a photo of a guy riding a bike and hes wearing
    a blue shirt....I want to cut out the blue shirt part and change
    its color on the fly, just by clicking on the blue shirt.
    Any ideas??
    Oh and does this process have a name?

    Yes, you're right - it is complicated!
    The reason is that with a photo of a guy wearing a blue
    shirt, that blue shirt is actually made up of hundreds of different
    subtle shades of blue.
    So to implement this, you'd need to perform a number steps,
    some of which are fairly complex:
    1) allow the user to select a point in the image
    2) read the colour at that point. You might find you need to
    take an average of a small area around that point to get a better
    approximation of the percieved colour at that point because the
    colour of pixels within a seemingly 'flat' area of colour can
    actually vary significantly. (this is why the photoshop inkdropper
    tool offers 3x3 and 5x5 average options).
    3) gradually 'scan' outwards from the pixel coordinate
    clicked on, checking each adjacent pixel in the image and comparing
    the difference in colour value against the initial colour selected
    (using getPixel). If it is within a certain tolerance, you can
    include it in the selection. You'll need to create an array or
    another image object to store the results in. Repeat this process
    until there are no more adjacent pixels that fall within the colour
    tolerance range.
    4) Use an RGB->HSB routine to convert the colour values to
    HSB, so that you can then adjust the 'Hue' value, and finally
    convert back to RGB. I have one here:
    http://robotduck.com/content/articles/director/imageManipulation/shiftHue.txt
    And whether it has a name?..
    well, the tool which selects an area within a certain colour
    range in photoshop is called the 'magic wand', so I guess that's a
    good way to refer to it - a magic wand function. And to change the
    colour by 'rotating' the colour values through the colour spectrum
    (which is what my example code does) is called 'shifting the hue'
    of the colours.
    hope this helps!
    - Ben

  • Dw cs5 with existing wordpress site hosted on yahoo need help connecting to existing remote database

    I am having trouble establishing a database connection.  I can  connect with test databases but am having trouble using dreamweaver wtih  my existing wordpress website.  Am I able to use dreamweaver to edit  and live view my changes before uploading the changed files to my live  site?  Am I able to access my existing wordpress database with  dreaweaver?  I have imported it to my testing server/database but still  seem to be having trouble establishing a connection with it (think maybe  my folder hierarchy might be off).
    macintosh HD/Applications/MAMP/htdocs/nwm/wp/index.php
    "nwm" is the name of the folder that I have copied all of my site  files to and the folder I have dreamweaver pointing to.  "wp" is what I  have all of the wordpress files in (the ones I copied from my yahoo  server - including all my current theme files etc.)
    I am trying to put the info into the mysql connection dialog box:
    Connection Name: Testing (i am assuming this name is for my benefit only and doesn't actually matter)
    MySQL Server: mysql
    User Name: *****
    Password: *****
    Database: wp
    and am getting this message
    MySQL Error#: 2013
    Lost connection to MySQL server at 'reading initial communication packet', system error 61
    did some google seaches of the error.  Tried turning off the  firewall, and the advance tab allow mysql incoming  (there were 2 one  was allow one was not allow.  I changed both to allow)
    Cant really find anything on yahoo to help me out.  Looked in  phpmyadmin database named wp: wp_users to get the username and password  (which due to previous look for help - I think the password was  encrypted cuz it looked like a bunch of mumbo jumbo and am fairly  certain I know the correct password).
    Any help would be greatly appreciated!! I spent $50 on live chat  last night trying to resolve the issue only to find out at the end that  the guy really didn't understand my problem and doesn't have  dreamweaver.  I have also watched countless videos on Lynda.com and have  been thru forum after forum.  While this problem is only a couple weeks  old since I just got CS5.  I have been having trouble making any  headway learning php since I cant seem to make it past the set up  parts.  I have done the php / mysql essential training on lynda.com with  relative success except that I really dont want to work with any more  exercise files so I didn't go on to the beyond the basics. I recently  went thru most of the Dreamweaver CS5 and Wordpress 3. Also did the  first 4 chapters of Dreamweaver CS5 with PHP and MySQL. I need to start  integrating things into my live sites.  I am also trying to work my way  thru the learning php, mysql, javascript book by o'reily media by robin  nixon (as fun as reading a math text book) can't get thru it since I  can't relate any of it to my current sites/needs
    I am on MacBookPro OSX 10.6.6
    Installed MAMP to specification on all 20 tutorials I have tried including lynda.com
    Tested the testing server and is working
    Just installed dreamweaver cs5
    have been using wordpress online to create and edit posts (recently  upgraded to 3.? whatever the latest update was online which I believe  update the files on my yahoo server?)
    Have also installed wordpress on my computer (several times thru each tutorial trying to get this right.)
    Am I expecting the impossible?

    If wordpress controls it's own connection why am I unable to use the live view. I have synced the remote site to my local computer so all the files should be just as they are online with the exception of the DB which contains most of the content.
    I have done all of those steps.  I have even exported the database from inside internet phpmyadmin and imported into computer phpmyadmin.  When I hit live view I get one of couple of errors.
    1.  "One is that the dynamic related files could not be displayed due to an internal server error"
    At some point I was able to view some sample files inside dreamweaver.  But I would like to be able to view my real site files.  I was able to "connect" to the local databases (not the copy of my real one - I think that maybe that was because it is somehow nested inside another db an am going try to reimport to new location).  And then I changed the host/username/password trying to deal with the internal server error. Now instead I get the cannot connect to the database Error 2016 or whatever from the origianl post. Also, I am using yahoo if that matters and all I can find about what their server name is: mysql - is that correct?
    I have been thru this so many times with so many different tutorials I am losing track of what is what.
    2.  Can I access my remote database within dreamweaver? I do not want to create dummy files (seems to be a waste of time).  And while if it had worked exporting/importing a duplicate on to my computer would have satisfied me for a little while it also seems some what counter productive.  Since every post and page is different if I were doing a daily updates etc how would I be able to change the formating or design of them if I can't access the remote files.  Would I re- import everytime I want to work on it to get current database?
    I am trying to be clear.  I listed all the specs I could think as listed  in your "how to get help fast post" (yes I read that at least twice  too) of all of the steps and possible reasons for my problems.  I also  thought that the forum was on a seperate site so I didn't think it would  count as a duplicate.  I am frustrated to tears and am feeling  incredibly stupid that after all this time and all these tutorials yes  you are right I obviously am not understanding what is going on which is  why I am on this forum.

Maybe you are looking for