Image Load Area

Hello. I am trying to make my images load in a specific area
on my html page when the thumbnails are clicked.
I have tried a few javascript tutorials but none that do
exactly this. Could anyone recommend a good one?
I have 6 thumbnails to the right of the my placeholder image,
all of the full size images are the same size. I have given the
default enlarged image the id of "placeholder" and feel like I'm
close.
I am using Dreamweaver 8
Any help much appreciated.

It's a native DW behavior (depending on which version of DW
you have it's
called either "SetText of Layer" or "SetText"). Select the
thumb and apply
the behavior.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"zsun01" <[email protected]> wrote in
message
news:gmcitl$lb5$[email protected]..
> Murray that is exactly what I am looking for.
>
> I'm having trouble applying the code to my images
though, as it is on the
> page
> applied to text links. My thumbnail images are in tables
and look like
> this
>
> <a href="images/main_img1.jpg"><img
src="images/thumb_1.jpg" alt=""
> width="150" height="129" border="0"></a>
>
> The code over the text links is (below)
>
> I'm having a hard time figuring out how to apply it onto
my thumbnails?
> Do I also need to copy the entire script from the head
section,
> unmodified?
> Thanks for your help.
>
> <UL>
> <LI><A
> onmouseover="MM_setTextOfLayer('imageLayer','','%3Cimg
> src=%22../templatepics/redbiz/redbiz_small.gif%22%3E')"
> href="javascript:;">LINK 1</A>
>

Similar Messages

  • Images loading from url

    Hi All !
    I am trying to load images onto a canvas using url source.
    The images loaded are forming a map , so its important that
    every image will be
    exactly in the wright place.
    The problem is that sometimes an image is not loaded , and I
    get error 504 "Gateway RequestTimeout" ,
    what i want to do is shorten the time of the error so if an
    image isnt loaded after 5 seconds i will get the error
    and reload it. How do i change the timeout of the loading ?
    or maybe i should use another method to load the images to
    the canvas ?
    10x alot !
    mr. flex ;)

    hi,
    looks like PaintComponent() instead of paint did the job.
    thanks a million..
    for those interested in loading images, I find ImageIcon very limited and at the end I found a better solution :
    public class ImageComponent extends JComponent implements ImageObserver{
        private Image image;
        public void loadImage(URL imageURL){           
                image = Toolkit.getDefaultToolkit().getImage(imageURL);
                prepareImage(image,getWidth(),getHeight(), this);
        public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height){
            System.out.print("."); // loading progress...
        public void paintComponent(Graphics g){
            if(image!=null){
                 g.drawImage(image,0,0,null);
    }it is far nicer as it displays dots while loading... up to you to attach progress bars or favorit loading guizmo...
    DrLeinster.

  • NEF images loaded on iMAC into PSCC are distorted, but not on Preview or second iMAC or MacBook Air

    NEF images loaded onto one IMAC into PSCC are distorted but show normally in Preview.   Same NEF on second iMAC and MacBook Air are not distorted.   Questions
    1.     Is there a setting in PSCC that needs to be tweaked
    2.   Is the PSCC loaded on the iMAC corrupted or need repair?   How does one determine which and how to fix?
    Thanks

    You have some lens correction enabled or a graphics hardware acceleration issue. nothing that a reinstall would fix. Since you haven't provided any relevant exact technical info, nobody can say more.
    Mylenium

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

  • How can I edit lightroom 5 smart previews on mac book pro (mbp) when the lightroom 5 master image files are on my external hard drive is disconnected from the mbp

    How can I edit lightroom 5 smart previews on mac book pro (mbp) when the lightroom 5 master image files are on my external hard drive is disconnected from the mbp? So far when I try to disconnect the external HD from the mbp, I get the following pop up window: The disk "external hard drive A" couldn't be ejected because "Lightroom" is using it. Quit that application and try to eject this disk again. When I do that and restart Lightroom 5, the Adobe Photoshop Lightroom - Select Catalog screen pops up but doesn't list my external hard drive A as a choice.
    I've reviewed Adobe's Lightroom Help | Smart Previews Lightroom 5 web page and still haven't been able to figure what I'm doing wrong. Any help would be appreciated.

    Your internal HDD. by default, is named 'Macintosh HD'. From what information you supplied, it looks like there is already a Lightroom catalog installed on you local (internal) HDD using the standard naming convention Adobe uses as well as a Lightroom catalog on your external drive which you created. To be sure of which catalog Lightroom is loading when it starts up, To do this, start Lightroom as you normally would. After it starts, select the Lightroom menu item, then select the Catalog Preferences item and finally, navigate to the General tab. The Location information will tell you exactly what catalog Lightroom is opening by default. This will likely be the Photography Mac Book Pro Versions catalog on your external HDD. Once that is confirmed, you are ready to proceed. As an additional test/verification, you can shut down Lightroom and, this time, start Lightroom while holding down the ALT/OPTION key. This will cause Lightroom to pause and display a screen which will allow you to chose a different catalog to open. Navigate to the /Users/[user name]/Pictures/Lightroom folder and select the Lightroom 5 Catalog.lrcat file. When Lightroom comes up, there should be no previews or folders as this catalog should be empty. Now you can be certain which catalog is being used and which catalog has all your data and you are ready to migrate your current catalog. Shut down Lightroom.
    To migrate your current catalog, use Finder to locate your Photography Mac Book Pro Versions folder on your external drive. Select the folder and select COPY from the context menu. Next, use Finder to navigate to the /Users/[user name]/Pictures/Lightroom folder on you internal HDD. You can start at the Macintosh HD level and work your way down by opening each level (Macintosh HD/Users/[user name]/Pictures). Select the /Pictures folder and then select PASTE... from the context menu. When the COPY/PASTE is complete, you should see the following files on the Macintosh HD:
    Macintosh HD/Users/[user name]/Pictures/Lightroom/ and
    Macintosh HD/Users/[user name]/Pictures/Photography Mac Book Pro Versions
    The Macintosh HD/Users/[user name]/Pictures/Lightroom folder will contain the empty default catalog the Adobe created when Lightroom was installed and Macintosh HD/Users/[user name]/Pictures/Photography Mac Book Pro Versions will contain a copy of the catalog you created on your external HDD.
    You are almost done now. Make sure your external drive is still attached for this step. Restart Lightroom using the ALT/OPTION key again. When the Select Catalog screen appears, select the Choose a Different Catalog button (lower left side). When you do, a Finder window will open to allow you to navigate to a catalog of your choosing. Navigate to Macintosh HD/Users/[user name]/Pictures/Photography Mac Book Pro Versions and select the file Photography Mac Book Pro Version.lrcat. This is the copy you just created. Select the Open button and Lightroom should start. You should see all of your previews and settings just as before. Also, in the left hand panel, all of your folder should show up and none of them should be dimmed and none of your previews should display a small exclamation point badge. Either a dimmed folder name or an exclamation point badge indicates that Lightroom can't find the associated image file. If everything looks good, go to the Lightroom menu, select Preferences and then select the General tab. Under Default Catalog, select an option to either load the LAST catalog opened or select the Users/[user name]/Pictures/Photography Mac Book Pro Versions catalog from the drop down. Shut down Lightroom and then restart it normally. This time, when Lightroom starts, you should be viewing the new copy of your catalog. You can confirm this by looking at the General tab on the Catalog Preferences screen (Lightroom/Catalog Preferences menu items). Shut down Lightroom once again and this time, eject your external drive before restarting. This time, your folders in the left hand panel will be dimmed but you should be able to work with your smart previews. If Lightroom should display a Select Catalog screen with the external drive detached, double check your settings as it indicates Lightroom is still looking at the copy of the catalog on the external drive rather than the new copy you made.
    Finally, if you are seeing dimmed folders and/or exclamation point badges with the external drive attached, this indicates a problem. You can select any folder and select Update Folder Location from the context menu. This will allow you to navigate to the copy on the external drive and select it. Lightroom will then update the catalog (select to synchronize the content). This will not only clear the dimmed folder problem but also remove the exclamation point badges for all photos in that missing folder. However, it may indicate that not all went well with the copy of the catalog so make sure to verify all went well. You can use the Get Info option on the two folders. You should see the same number of files/folders for both the copy on the internal drive as well as on the external drive but you can't rely on the byte count because of the possibility of differences between the geometry of the two drives. Hope this all helps!

  • XML scrolling thumbnail, image loader, & Buttons [halfway works]

    Intro:
    I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.
    For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]
    Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.
    I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...]
    Screenshot of Site/Timeline:
    Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.
    Issue #1
    As of now when the swf file is saved out you get exactly what you see above:
    a: A scrolling thumbnail
    b: ...which loads a large image when clicked on it - PEFECT...
    BUT...
    1a: I need for the buttons to load in this action, not for it to just load on its own.
    [i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
    note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.
    Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
    1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.
    [I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"]
    [also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
    From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
    Issue #2
    At this point I would be tickled pink just to get this to basic function to work.
    However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]
    With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
    Conclusion:
    Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.
    Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.
    I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science. [yes, for many its not...but my brain just does not operate that route despite all the tutorials thrown at me.]
    Again, it would seem that there would be a button panel where you could drag options like scrolling thumbnail slider, loader, and then parameters would come up. [much like Apples iWeb. - but before the argument of one being pro and the other for non-pros, I see it differently. Software should not be the limiting factor in how flexible you can design, or rather ones lack of programming shouldnt be. With all the talented, and I say this in all humility and honesty, programmers working for Adobe, Im sure something could be programmed like what Im asking for.]
    note: Director is a good example, back in 1997 I knew nothing of multimedia and in one week I had assembled a portfolio, clicking buttons, speech, movies, and all. - and no, I dont have the money to buy more software!
    At this moment I am at the mercy of someone who reads code like its a nighttime tale they are telling their kids, and who can see the exact issue I have and can share the appropriate, correct code. [as I have noticed, it has to be on target - naturally - but this target changes with just a slight change in the design.]
    Thank you,
    peace
    Dalen
    p.s.
    The actionscript: [note: This is only the current working/good code that Im trying to get the buttons to call up.]
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML ();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array;//Array of full size image urls
    var thumbURL:Array = new Array;//Array of thumbnail urls
    var thumbX:Number = 25;//Initial offset of _x for first thumbnail
    x.onLoad = function(){ //Function runs after XML is loaded
        var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0;i<photos.length;i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);         
              var t = panel.attachMovie("b","b"+i,i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function () {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function () {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function () {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function () {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease  = function () {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    x.load ("silk_paintings.xml");// path to XML file
    panel.onRollOver = panelOver;
    function panelOver() {
         this.onEnterFrame = scrollPanel;
         delete this.onRollOver;
    var b = stroke.getBounds(_root);
    function scrollPanel() {
         if (_xmouse<b.xMin||_xmouse>b.xMax||_ymouse<b.yMin||_ymouse>b.yMax) {
         this.onRollOver = panelOver;
         delete this.onEnterFrame;
         if (panel._x >= 740) {
         panel._x = 740;
    if(panel._x <= (thumbX-10))  {
              panel._x = (thumbX-10)
         var xdist = _xmouse - 830;
         panel._x += -xdist / 7;
    The xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <slideshow>
    <photo thumbs="thumbnails/i_brown_fairy.jpg"  urls="images/brown_fairy.jpg"  />
    <photo thumbs="thumbnails/i_blonde_fairy.jpg"  urls="images/blonde_fairy.jpg"  />
    <photo thumbs="thumbnails/i_flower_fairy.jpg"  urls="images/flower_fairy.jpg"  />
    <photo thumbs="thumbnails/i_red_fairy.jpg"  urls="images/red-fairy.jpg"  />
    </slideshow>
    Attached is a link to the file I made named "index".
    https://rcpt.yousendit.com/706233226/5e7b4fe0973dacf090b5cbae32c47398
    I would have liked to have included the following files but was limited due to "you-send-it" not uploading folders.  Files not included: [but functioning] : xml list - images [folder] - thumbnails [folder]
    Again, Thank you
    Dalen

    The issues with the buttons calling up the scrolling thumbnail panel have been resolved, as well as keeping the buttons in their hit state once clicked, thanks to Rob.
    Those that have been following this thread, or stumble upon it in their searches later, may appreciate to see the final solution to this particular issue.
    [Hopefully I will be able to update this thread with a url in the future to show the site in operation, which may help somebody with their project in the future if its set up similarly.]
    Alas, it would be nice if future versions of flash had a more direct, flexible, user friendly method for creating navigation.
    [We may see development beyond the flash ads which everyone seems to loathe... and more creativity with flash in terms of games, web interactivity, &  animation.
    Below are 2 sets of code:
    a] the first is located within the first frame of the first button, and has some extra variables in it that the additional buttons call upon...
    b] the second is the code applied to every other button.
    stop();
    fscommand("allowscale", false);//keep SWF display at 100%
    var x:XML = new XML();//Define XML Object
    x.ignoreWhite = true;
    var fullURL:Array = new Array();//Array of full size image urls
    var thumbURL:Array = new Array();//Array of thumbnail urls
    //  .......  CHANGE
    var thumbX:Number;// = 25;//Initial offset of _x for first thumbnail
    // make an array of all of the instance names of each button object...
    // only do this once
    var buttonsList:Array = new Array(shadesOfGrey, silkPaintings);
    shadesOfGrey.isLatched = false;
    // the rollover function... repeat for each button
    shadesOfGrey.onRollOver = shadesOfGrey.onDragOver=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(2);
    // the rolloff function... repeat for each button
    shadesOfGrey.onRollOut = shadesOfGrey.onDragOut=shadesOfGrey.onReleaseOutside=function ():Void {
         if (!this.isLatched) {
              this.gotoAndStop(1);
    // the mouse press function... repeat for each button
    shadesOfGrey.onPress = function():Void  {
         resetAllButtons();
         this.isLatched = true;
         this.gotoAndStop(3);
    shadesOfGrey.onRelease = function():Void  {
         x.load("shadesOfGrey.xml");// path to XML file
         thumbX = 25;
    function resetAllButtons():Void {
         for (b in buttonsList) {
              buttonsList[b].isLatched = false;
              buttonsList[b].gotoAndStop(1);
    x.onLoad = function() {//Function runs after XML is loaded
         //  resets the position of the panel on each new load
         panel._x = 740;
         //  .......  CHANGE  removes the existing movieclips from the panel before any new load...
         for (c in panel) {
              if (typeof (panel[c]) == "movieclip") {
                   removeMovieClip(panel[c]);
         var photos:Array = this.firstChild.childNodes;//Defines variable for length of XML file
         for (i=0; i<photos.length; i++) {//For loop to step through all entry lines of XML file
              fullURL.push(photos[i].attributes.urls);//Each loop, adds URL for full sized image to Array fullURL
              thumbURL.push(photos[i].attributes.thumbs);//Each loop, adds URL for thumbnails to Array thumbURL
              //trace(i+". Full Image = "+fullURL[i]+"  Thumb Image = "+thumbURL[i]);
              var t = panel.attachMovie("b", "b"+i, i);//Each loop, Define local variable 't' as a new instance of 'b' movie clip, given unique instance name of 'b' plus the index number of the For loop
              t.img.loadMovie(thumbURL[i]);// Each loop, load thumbnail image from XML data into variable movie clip
              t._y = 0;//Set Y coordinate of variable movie clip
              t._x = thumbX;//Set X coordinate of variable movie clip based on variable thumbX
              t.numb = i;//Set sub-variable 'numb' inside variable t to hold index number
              t._alpha = 75;//Set the Alpha value of the variable movie clip to 75% - for onRollOver highlight action
              thumbX += 55;//Increment thumbX value so next thumbnail is placed 125 pixels to the right of the one before
              t.onRollOver = function() {//define onRollOver event of the variable movie clip
                   this._alpha = 100;//Set thumbnail alpha to 100% for highlight
              t.onRollOut = function() {//define onRollOut event of the variable movie clip
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onPress = function() {//define onPress event of the variable movie clip
                   this._rotation += 3;//rotates thumbnail 3 degrees to indicate it's been pressed
                   this._x += 3;//Offset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y -= 3;//Offset Y coordinate by 3 pixels to keep clip centered during rotation
              t.onReleaseOutside = function() {//define onRelease event of the variable movie clip
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during rotation
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during rotation
                   this._alpha = 75;//Reset thumbnail alpha to 75%
              t.onRelease = function() {//define onRelease function to load full sized image
                   this._rotation -= 3;//rotate thumbnail back 3 degrees
                   this._x -= 3;//Reset X coordinate by 3 pixels to keep clip centered during
                   this._y += 3;//Reset Y coordinate by 3 pixels to keep clip centered during
                   this._alpha = 75;//Reset thumbnail alpha to 75%
                   holder.loadMovie(fullURL[this.numb]);//Load full sized image into holder clip based on sub-variable t.numb, referenced by 'this'
         holder.loadMovie(fullURL[0]);//Initially load first full size image into holder clip
    // this one function scrolls the panel for all of the buttons, it gets the
    // size of the panel when the images are loaded by any given button...
    stroke.onEnterFrame = function() {
         if (this.hitTest(_xmouse, _ymouse, false)) {
              if (panel._x>=740) {
                   panel._x = 740;
              if (panel._x<=740-panel._width+mask._width) {
                   panel._x = 740-panel._width+mask._width;
              if ((panel._x<=740) && (panel._x>=740-panel._width+mask._width)) {
                   var xdist = _xmouse-830;
                   panel._x += -xdist/7;
    Of note is the change to how the movie clips are measured... this change in and of itself has really helped to make the thumbnail panels operation more efficient.
    Below is the script for each additional button: [Having issues with the forums not letting me post additional code, so I will put the remaining code in a reply below.]
    cont.

  • Bizarre image load problem in InDesign CS2

    Hi, I am having a problem with bringing in some images into InDesign CS2. I have a document file that has many images in place, and I just received some new images that are screenshots from video. They are saved as rgb jpgs. They are 2700x1963 pixels and 300dpi (so someone obviously did some conversion from screen res.)
    When I try to bring them into an image box in InDesign, I do command D, then select the image. It acts like its loading it but then nothing is in the box. I thought perhaps the image was just hidden outside of the edge of the box but when I go to "fitting" under the "OBJECT" menu, all the options are greyed out as if there is no image there. It also shows no image linked in the links panel.
    I tried opening in photoshop and resaving, and also tried resaving as another name. I tried changing it to cmyk and adjusting the levels and resaving as tif. I tried making a new photoshop file and copy-and=pasting the image into it and saving. Still, no image will load in the image box.
    I feel like the images must have corrupted since they were sent to me as email attachments, but its so odd that they open in photoshop just fine. Any ideas?

    nevermind, people.
    my computer was having memory overload. on a whim I restarted the computer.
    BAM...no issue.
    You know what they always say, "When all else fails, restart your computer!"

  • Issue with Image Loader in 14.0

    Hi All,
    In our application, we have a custom function module in ECC, which is passing the URL of an image uploaded on the content management server(KPRO). Custom FM calls 'SDOK_PHIO_GET_URL_FOR_GET' to get the URL of the image.
    When we execute the FM in ECC, we get the URL as:
    http://gbswidkprodb01.global.rexam.net:81/ContentServer/ContentServer.dll?get&pVersion=0046&contRep=YA&docId=001F296E9EB61ED3B6F490000438C20C&compId=TJ12A.jpg&accessMode=r&authId=CN%3DBC3,OU%3DI0520020335,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&expirat
    when I use this URL in the browser the image gets loaded in browser.
    When I capture the output of JCO call in write file URL returned from FM is:
    http://<server>:81/ContentServer/ContentServer.dll?get&amp;pVersion=0046&amp;contRep=YA&amp;docId=001F296E9EB61ED3B6F490000438C20C&amp;compId=TJ12A.jpg&amp;accessMode=r&amp;authId=CN%3DBC3,OU%3DI0520020335,OU%3DSAPWebAS,O%3DSAPTrustCommunity,C%3DDE&amp;expiration=20140617181313&amp;secKey=MIIBUgYJKoZIhvcNAQcCoIIBQzCCAT8CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAR4wggEaAgEBMG8wZDELMAkGA1UEBhMCREUxHDAaBgNVBAoTE1NBUCBUcnVzdCBDb21tdW5pdHkxEzARBgNVBAsTClNBUCBXZWIgQVMxFDASBgNVBAsTC0kwNTIwMDIwMzM1MQwwCgYDVQQDEwNCQzMCByASCCcTUiEwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE0MDYxNzE2MTMxM1owIwYJKoZIhvcNAQkEMRYEFM%2FKd4MzWL0y1KfF58AHNg9PYqOlMAkGByqGSM44BAMELzAtAhUAtqASnXbD3E2ZM8EhG%2FLxgJhKCs0CFH0qFlBxzWlzS8kjeFw3kad63SHW
    when I use this URL in the browser I get 'HTTP 400' error.
    Using either of the two URL's in the image loader I get the error:
    [WARN] [ImageLoader_0]ImageLoader_0 Status: 400 - (bad request)
    We are currently on SAP MII 14.0 SP05(patch 3).
    Thanks in advance for your help.
    Regards,
    Darshan

    Sam,
    I tried logging in to ECC with the same user as the one that is making the Jco connection and it is giving the same URL which i was getting earlier when i was executing the FM with my user id. I am testing the FM through SE37.
    There is no logic in the custom BAPI to replace the <server> keyword. Based on the image name, it gives the URL of where the image is stored on the KPRO server.
    Could not find URL Decode function in the MII link editor, i believe it is the decode function which you are referring to. Even that is not working. If it is something other than this, do let me know.
    PS: This works fine in the 11.5 system from which we have upgraded to 14.0.
    regards,
    darshan

  • No Action Until Image Loads, Please

    Hi;
    For some reason the squares of color that are supposed to load behind the image that acts as a mask load first, momentarily showing while the image loads, which looks bad. Hre is the code:
    package
        import flash.display.Sprite;
        import flash.text.TextLineMetrics;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFormatAlign;
        import flash.text.TextFieldAutoSize;
        import flash.net.navigateToURL;
        import flash.display.Bitmap;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.display.MovieClip;
        import com.greensock.*;
        import com.greensock.easing.*;
        import flash.display.Loader;
        import flash.events.ProgressEvent;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.net.URLRequest;
        import Images;
        import flash.display.SpreadMethod;
        [SWF(backgroundColor="0x505050")]
        public class BillsBBQPreloader extends MovieClip
            var loader:Loader = new Loader();
            var loader2:Loader = new Loader();
            var loader3:Loader = new Loader();
            var loader4:Loader = new Loader();
            var loader5:Loader = new Loader();
            private var myTextField:TextField = new TextField();
            var imgFlag1:Boolean = new Boolean(false);
            var imgFlag2:Boolean = new Boolean(false);
            var imgFlag3:Boolean = new Boolean(false);
            var imgFlag4:Boolean = new Boolean(false);
            var imgFlag5:Boolean = new Boolean(false);
            var thermometer:Images = new Images();
            var thermometerMask:Images = new Images();
            var mask_container:Sprite = new Sprite();
            var square:Sprite = new Sprite();
            public function BillsBBQPreloader()
                addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
            private function init(e:Event)
    //            addChild(mask_container);
    //            mask_container.addChild(thermometerMask);
                addChild(square);
                AddThermometer();
            private function AddText():void
                var clientName:TextField = new TextField();
                var format:TextFormat = new TextFormat();
                format.font = 'Arial';
                format.size = 35;
                clientName.textColor = 0x023048;
                clientName.text = "Bill's Texas Pit BBQ";
                clientName.autoSize = TextFieldAutoSize.LEFT;
                clientName.setTextFormat(format);
                var nameSprite:Sprite = new Sprite();
                nameSprite.x = stage.stageWidth/2 - 150;
                nameSprite.y = 10;
                nameSprite.alpha = 0;
                TweenLite.to(nameSprite, 2, {alpha:1});
                addChild(nameSprite);
                nameSprite.addChild(clientName);
                AddWhite();
            private function AddThermometerMask():void
                thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
                AddRed();
            private function AddWhite():void
                square.graphics.beginFill(0xffffff);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(100,0);
                square.graphics.lineTo(100,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-100)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddRed();
            private function AddRed():void
    //            square.mask = mask_container;
                square.graphics.beginFill(0xff0000);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(75,0);
                square.graphics.lineTo(75,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-74)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddLoaders();
            private function AddThermometer():void
                thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
                addChild(thermometer);
    //            AddThermometerMask();
                AddText();
            private function AddLoaders():void
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
                loader.load(new URLRequest("images/logo_w_fire.png"));
                loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
                loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
                loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
                loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
                loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
                removeEventListener(Event.ADDED_TO_STAGE, init);
                addChild(myTextField);
                myTextField.width = 250;
                myTextField.x = (stage.stageWidth-50)/2;
                myTextField.y = 470;
                myTextField.selectable = false;
                myTextField.border = false;
                myTextField.borderColor = 0xAA0000;
                myTextField.autoSize = TextFieldAutoSize.LEFT;
                var myFormat:TextFormat = new TextFormat();
                myFormat.color = 0x023048;
                myFormat.size = 24;
                myFormat.italic = true;
                myTextField.defaultTextFormat = myFormat;
            private function imageLoaded(event:Event):void
                imgFlag1 = true;
                if (imgFlag2 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded2(event:Event):void
                imgFlag2 = true;
                if (imgFlag1 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded3(event:Event):void
                imgFlag3 = true;
                if (imgFlag1 == true && imgFlag2 == true)
                    completePreloader();
            function completePreloader()
                var req:URLRequest = new URLRequest('index.py');
                navigateToURL(req, '_self');
            function loop(e:ProgressEvent):void
                var perc:Number = e.bytesLoaded/e.bytesTotal;
                myTextField.text = Math.ceil(perc*100).toString() + "%";
                var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
                square.y = myY;
    Here's the code for Images()
    package  {
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.filters.*;
        import flash.filters.BitmapFilterQuality;
        import flash.net.URLRequest;
        import flash.net.URLLoader;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.DisplayObject;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        public class Images extends MovieClip
            private var parent_container:Sprite = new Sprite();
            private var _path:String = new String("path");
            private var _myWidth:Number = new Number(20);
            private var _myHeight:Number = new Number(20);
            private var _myX:Number = new Number(20);
            private var _myY:Number = new Number(20);
            private var _myURL:String = new String("url");
            public function Images():void
            public function set ImagesArray(_imagesArray:Array):void
                _path = _imagesArray[0];
                _myURL = _imagesArray[1];
                _myWidth = _imagesArray[2];
                _myHeight = _imagesArray[3];
                _myX = _imagesArray[4];
                _myY = _imagesArray[5];
                LoadImage();
            function LoadImage():void
                parent_container = new Sprite();
                addChild(parent_container)
                var req:URLRequest = new URLRequest(_path);
                var loader:Loader = new Loader();
                loader.load(req);
                loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);         
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
            function LoadedImage(e:Event):void
                var loaderInfo:LoaderInfo = e.target as LoaderInfo;
                var displayObject:DisplayObject = loaderInfo.content;
                displayObject.width = _myWidth;
                displayObject.height = _myHeight;
                parent_container.addChild(displayObject);
                parent_container.x = _myX;
                parent_container.y = _myY;
            function ioErrorHandler(event:IOErrorEvent):void {
                trace("ioErrorHandler: " + event);
    I have experimented with adding the square child elsewhere (such as in the code where it is created twice), but that proves even more disastrous. Please advise.
    TIA,
    Beno

    Oops. I realize now you guys showed me how to do this; namely dispatchEvent(). (This was a problem I set aside while we solved the one that addressed this issue.) Here is the revised code which accomplishes what I wanted:
    package
        import flash.display.Sprite;
        import flash.text.TextLineMetrics;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFormatAlign;
        import flash.text.TextFieldAutoSize;
        import flash.net.navigateToURL;
        import flash.display.Bitmap;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.display.MovieClip;
        import com.greensock.*;
        import com.greensock.easing.*;
        import flash.display.Loader;
        import flash.events.ProgressEvent;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.net.URLRequest;
        import Images;
        import flash.display.SpreadMethod;
        [SWF(backgroundColor="0x505050")]
        public class BillsBBQPreloader extends MovieClip
            var loader:Loader = new Loader();
            var loader2:Loader = new Loader();
            var loader3:Loader = new Loader();
            var loader4:Loader = new Loader();
            var loader5:Loader = new Loader();
            private var myTextField:TextField = new TextField();
            var imgFlag1:Boolean = new Boolean(false);
            var imgFlag2:Boolean = new Boolean(false);
            var imgFlag3:Boolean = new Boolean(false);
            var imgFlag4:Boolean = new Boolean(false);
            var imgFlag5:Boolean = new Boolean(false);
            var thermometer:Images = new Images();
            var thermometerMask:Images = new Images();
            var mask_container:Sprite = new Sprite();
            var square:Sprite = new Sprite();
            public function BillsBBQPreloader()
                addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
            private function init(e:Event)
    //            addChild(mask_container);
    //            mask_container.addChild(thermometerMask);
                AddThermometer();
            private function AddText():void
                var clientName:TextField = new TextField();
                var format:TextFormat = new TextFormat();
                format.font = 'Arial';
                format.size = 35;
                clientName.textColor = 0x023048;
                clientName.text = "Bill's Texas Pit BBQ";
                clientName.autoSize = TextFieldAutoSize.LEFT;
                clientName.setTextFormat(format);
                var nameSprite:Sprite = new Sprite();
                nameSprite.x = stage.stageWidth/2 - 150;
                nameSprite.y = 10;
                nameSprite.alpha = 0;
                TweenLite.to(nameSprite, 2, {alpha:1});
                addChild(nameSprite);
                nameSprite.addChild(clientName);
                AddWhite();
            private function AddThermometerMask():void
                thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
                AddRed();
            private function AddWhite():void
                square.graphics.beginFill(0xffffff);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(100,0);
                square.graphics.lineTo(100,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-100)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddRed();
            private function AddRed():void
    //            square.mask = mask_container;
                square.graphics.beginFill(0xff0000);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(75,0);
                square.graphics.lineTo(75,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-74)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddLoaders();
            private function AddThermometer():void
                thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
                thermometer.addEventListener("loadcomplete", AddToStage);
            private function AddToStage(e:Event):void
                addChild(square);
                addChild(thermometer);
                AddText();
            private function AddLoaders():void
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
                loader.load(new URLRequest("images/logo_w_fire.png"));
                loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
                loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
                loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
                loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
                loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
                removeEventListener(Event.ADDED_TO_STAGE, init);
                addChild(myTextField);
                myTextField.width = 250;
                myTextField.x = (stage.stageWidth-50)/2;
                myTextField.y = 470;
                myTextField.selectable = false;
                myTextField.border = false;
                myTextField.borderColor = 0xAA0000;
                myTextField.autoSize = TextFieldAutoSize.LEFT;
                var myFormat:TextFormat = new TextFormat();
                myFormat.color = 0x023048;
                myFormat.size = 24;
                myFormat.italic = true;
                myTextField.defaultTextFormat = myFormat;
            private function imageLoaded(event:Event):void
                imgFlag1 = true;
                if (imgFlag2 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded2(event:Event):void
                imgFlag2 = true;
                if (imgFlag1 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded3(event:Event):void
                imgFlag3 = true;
                if (imgFlag1 == true && imgFlag2 == true)
                    completePreloader();
            function completePreloader()
                var req:URLRequest = new URLRequest('index.py');
                navigateToURL(req, '_self');
            function loop(e:ProgressEvent):void
                var perc:Number = e.bytesLoaded/e.bytesTotal;
                myTextField.text = Math.ceil(perc*100).toString() + "%";
                var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
                square.y = myY;
    package  {
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.filters.*;
        import flash.filters.BitmapFilterQuality;
        import flash.net.URLRequest;
        import flash.net.URLLoader;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.DisplayObject;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        public class Images extends MovieClip
            private var parent_container:Sprite = new Sprite();
            private var _path:String = new String("path");
            private var _myWidth:Number = new Number(20);
            private var _myHeight:Number = new Number(20);
            private var _myX:Number = new Number(20);
            private var _myY:Number = new Number(20);
            private var _myURL:String = new String("url");
            public function Images():void
            public function set ImagesArray(_imagesArray:Array):void
                _path = _imagesArray[0];
                _myURL = _imagesArray[1];
                _myWidth = _imagesArray[2];
                _myHeight = _imagesArray[3];
                _myX = _imagesArray[4];
                _myY = _imagesArray[5];
                LoadImage();
            function LoadImage():void
                parent_container = new Sprite();
                addChild(parent_container)
                var req:URLRequest = new URLRequest(_path);
                var loader:Loader = new Loader();
                loader.load(req);
                loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);         
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
            function LoadedImage(e:Event):void
                var loaderInfo:LoaderInfo = e.target as LoaderInfo;
                var displayObject:DisplayObject = loaderInfo.content;
                displayObject.width = _myWidth;
                displayObject.height = _myHeight;
                parent_container.addChild(displayObject);
                parent_container.x = _myX;
                parent_container.y = _myY;
                dispatchEvent(new Event("loadcomplete"));
            function ioErrorHandler(event:IOErrorEvent):void {
                trace("ioErrorHandler: " + event);
    Thanks,
    Beno

  • Image map areas not dynamic

    I have created a complexer version of the imageMenu, http://www.phatfusion.net/imagemenu/, which allows the active shapes to be any shape, not only rectangular, see http://jrvproducts.nl/ . This works great in all browser except safari, not in windows, neither on Mac.
    The menu works with a single transparent overlay image which has image map areas (see source if you like. The map start at line 37). These areas are updates onDomReady and also when the menu is in motion by calculating the coordinates and setting the 'coords' attribute of every area. Setting this attribute doesn't seem to work in safari. I believe safari 3.0 on windows did do it onDomready, but not after page load. Now, in 3.1, the 'coords' aren't even being set onDomready anymore.
    To see the 'coords' updating in action, see http://www.saulmade.nl/forum/slideMenu/ . Here I enabled the 'draw areas' option I've built for testing purposes. (It's actually drawing the shapes on canvas, but used the same coordinates as by which the areas are updated)
    This looks to me like a bug, but perhaps anyone has a better explanation?
    Can I submit issues to Apple?

    darn, no-one seems to know an answer
    To get this a bit further, or at least under the attention of the developers, *is there any way I can submit issues to Apple?*

  • Default image loading icon changed

    Hello,
    I installed a social app that has hijacked my "image loading" icon.
    What I mean is that when I am using ANY app that requires time to download an image, the icon that displays on the screen to indicate that there is a pending image loading has changed and been hijacked by this social app.
    I have wiped my ipad to factory defaults and set it up as a new ipad WITHOUT syncing any data. I downloaded an app fresh like dropbox and flickr stacker, and the chat app image remains (Even though the social app has NOT been installed on this fresh wipe) when pending an image download
    I'm hoping somone has an idea as how to get rid of this blasted artifact!
    TIA!
    -A

    If I remember well, in the Report Attributes, you should select the linked column. At the link image, there are 2 edit images(the default is the big one), but there is one more image which is smaller.
    Hope it helps.

  • Help, When I upload my website all image links are missing!

    Hello, new dreamweaver cs5 user here. When I preview on firefox everything looks great! After uploading all image files are missing. www.cityrevealed.com

    There are still plenty of images attempting to be loaded from a folder level above the Root:
    <img src="../images/header2.jpg" width="960" height="226" border="0"
    are you sure there is an "images" folder in the root?
    http://www.cityrevealed.com/images/
    Typically attempting to look at the index file of a folder level will return "Access Prohibited" or actually reveal the file and sub folder structure with that folder level... but trying to directly access the "images" folder returns page not found. While I realize there may not be any index page there... I would normally be getting "Access Prohibited".
    You may have made changes but are you sure they have ALL been uploaded to the server?
    Are you uploading via DreamWeaver or an FTP program?
    How are you verifying that the server folder structure is exactly the same as your local machine?
    Adninjastrator

  • Height and width of image loaded into blob?

    i am loading images into my database which is all working fine. in parts of my app i am displaying these images so i am wondering is there a way to get the dimensions (height an width) of the image you are loading in so that when it comes time to display you can scale as needed but the aspect ratio is the same so then the image is not distorted by just putting some random values for height and width.
    <br><br>
    eg
    instead of
    <br><br>
    select decode(file_type,'I','<imge src="OWNER.download_file?p_file=' || nvl(file_id,0) ||'" height="100" width="100" />','') from project_file
    where file_id = :P31_FILE_ID
    <br><br>
    i want to replace 100 with values from columns in table that were loaded at time of save
    Message was edited by:
    victorp

    thanks scott. is it correct to say that this example is storing the image at whatever size the user puts in the width and height boxes on screen? thats what it looks like to me anyway. i see there are functions to get these but does the user have to enter them still? it will be just what i need if indeed I do need it!
    Yes, that's correct. Of course you could modify the code so that you choose the size of the image, and not allow the user to change it.
    Thanks,
    - Scott -

  • Image loading problem

    I've been having a problem with my app that is designed to take an image, scale it into 3 different sizes and then save it.
    The problem seems to be that the image doesn't load correctly as when I look at the width and height of it, they come back as -1. I've tried both:
    try
                image = ImageIO.read(new File(url));
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + url);
            }and
    image = Toolkit.getDefaultToolkit().getImage(url);my code at present looks like this:
    package resizeImage;
    import com.sun.image.codec.jpeg.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import javax.swing.ImageIcon;
    public class resizeImage
        public BufferedImage convert(Image im)
            BufferedImage bi = new BufferedImage(im.getWidth(null),im.getHeight(null),BufferedImage.TYPE_INT_RGB);
            Graphics bg = bi.getGraphics();
            bg.drawImage(im, 0, 0, null);
            bg.dispose();
            return bi;
        public String resize(String url, String id)
            // Try and load image -------------------------------------------------
            this.url = "hobbes.jpg";
            this.id = "1";
            try
                image = ImageIO.read(new File(url));
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + url);
            //image = Toolkit.getDefaultToolkit().getImage(url);
            //BufferedImage temp = convert(image);
            int temp1 = image.getWidth(null);
            int temp2 = image.getHeight(null);
            return ("Width = "+temp1+"\tHeight = "+temp2);
    ...

    Your code loaded an image okay. It could be that the image you are trying to load has
    corrupted data. Using the 'getResource' method simplifies the process of making up urls.
    The Swing tutorial page "How to Use ImageIcons" has a discussion on its use. If you use
    the Toolkit 'getImage' methods be sure to use a MediaTracker to load the image since these
    methods return immediately. The MediaTracker api has demo code.
    import com.sun.image.codec.jpeg.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import javax.swing.ImageIcon;
    public class ImageLoading
        public BufferedImage convert(Image im)
            BufferedImage bi = new BufferedImage(im.getWidth(null),
                                                 im.getHeight(null),
                                                 BufferedImage.TYPE_INT_RGB);
            Graphics bg = bi.getGraphics();
            bg.drawImage(im, 0, 0, null);
            bg.dispose();
            return bi;
        public String resize(String path, String id)
            BufferedImage image = null;
            try
                URL url = getClass().getResource(path);
                image = ImageIO.read(url);
            catch(MalformedURLException mue)
                System.err.println("mue for : " + path + " = " + mue.getMessage());
            catch(IOException e)
                e.printStackTrace();
                throw new RuntimeException("Error loading file: " + path);
            int imageWidth  = image.getWidth(null);
            int imageHeight = image.getHeight(null);
            BufferedImage bi = convert(image);
            int biWidth  = bi.getWidth();
            int biHeight = bi.getHeight();
            return ("imageWidth = " + imageWidth + "\timageHeight = " + imageHeight + "\n" +
                    "biWidth    = " + biWidth +    "\tbiHeight    = " + biHeight);
        public static void main(String[] args)
            ImageLoading test = new ImageLoading();
            String s = test.resize("images/cougar.jpg", "1");
            System.out.println(s);
    }

  • Problem with dimension of an image loaded from a database

    Hi,
    I succeed in saving image in a MSAccess database with this code:
    Image img;
    image = new ImageIcon("d:\\prova\\comore.jpg");
    img=image.getImage();
    try{
    int[] pix = new int[img.getWidth(null) * img.getHeight(null)];
    PixelGrabber pg = new PixelGrabber(img, 0, 0, img.getWidth(this), img.getHeight(this), pix, 0, img.getWidth(this));
    pg.grabPixels();
    System.out.println(pix.length);
    byte[] pixels = new byte[img.getWidth(this) * img.getHeight(this)*4];
    for(int j=0;j<pix.length;j++){
    pixels[j] = new Integer(pix[j]).byteValue();
    String sql="insert into Immagini values ('1',?)";
    PreparedStatement ps = con.prepareStatement(sql);
    ps.setBytes(1,pix);
    ps.executeUpdate();
    }catch(Exception except){
    except.printStackTrace();
    then, I've load the image with this code:
    try{
    String query = "select * from Immagini where IDprog = 1";
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs=s.getResultSet();
    rs.next();
    Viaggio vi = new Viaggio(rs.getInt(1),rs.getBytes(2));
    byte[] b=vi.getBytesImage();
    int[] intImage = new int[b.length];
    for(int j=0;j<b.length;j++){
    intImage[j]=(int)b[j];
    Image img = createImage(new MemoryImageSource(124,100,intImage,0,124));
    ImageIcon imgic = new ImageIcon(img);
    jLabel3.setIcon(imgic);
    }catch(Exception tps){
    tps.printStackTrace();
    All works correctly;
    but I've two problems:
    How do I do to take the dimension of the image from the byte array?
    infact in the code up written I've used 124 and 100 as image dimension;
    but I can have images of different dimension.
    The other problem is:
    Why in the image that is loaded are not the same number of colors of the image saved, but only a few, so that the image seems to be out of focus?
    Thank and excuse me for my english.
    I'm Italian.

    Noone can help me?
    Thank

Maybe you are looking for

  • Hard Drive Issues and Time Machine

    I have a Macbook Pro with a 500GB hard drive with a Bootcamp partition. While in on Mac side, the MBP slipped off the couch and hit the carpet (only like a half foot). I noticed things were running sluggish so I ran Onyx, which stated that the startu

  • Which is "better" when converting from VOB: MPG, AVI or DV or ???

    Hi, I am not a techie, but following the advice of posted by Steve Grisette, I was able to download the software from Squared5, which allows me to convert my old VOB's into other formats. For some reason, I chose the MPEG conversion and they do play

  • How do i create a copy box?

    Hi, i'm sure some of you may be scratching your heads wondering what the heck a copy box is...well since I don't know the actual name that's what i'll call it. A copy box is a box on a website from which you can copy a html code from. Perfect example

  • TS4088 What happens if problems persist after I install the patch?

    I've installed the software patch a few times and find that for a few days to a few weeks the intermittent loss of video seems fixed, and then it will come back with several blackouts in a short span of time, which prompts me to install the patch aga

  • Advantages of LSMW over BDC

    <b>What are the advantages of LSMW over BDC ? In which context we would be using LSMW ?</b> ( as per my idea ,LSMW doesnt require any coding and would be used by functional consultants.<b>Apart from this any other advantages of using LSMW ?</b> )