On 11/07/2013 03:35 PM, Jeroen Smit wrote:

Hi,

The call you suggest results in "png".

Also the images display correctly. It is just a warning I do not understand which doesn't seem to have any effects.

The image is included using an asset statement so it should have been loaded right?


No, there is no automatic loading of images. That would defeat various performance considerations.

Images are *registered* with your application due to the @asset hints. That means qooxdoo's runtime has information about the image, such as size, type, etc. Also, for the build version those images are copied under the 'build/' folder.

But it does not mean the image itself is loaded automatically. Most images loaded by the framework classes are loaded indirectly, by the browser, through setting DOM/Style attributes. So qx.io.ImageLoader is basically an application-level API, to preload images to speed up certain renderings.

An alternative for your cell renderer that would aleviate you from explicitly loading images into the browser would be defining a custom theme. Then the theming system could take care of that.

HTH,
T.

Best regards,

Jeroen

*From:*thron7 [mailto:thomas.herchenroe...@1und1.de]
*Sent:* donderdag 7 november 2013 15:20
*To:* qooxdoo Development
*Subject:* Re: [qooxdoo-devel] ImageLoader: Not recognized format of external image...

On 11/07/2013 02:11 PM, Jeroen Smit wrote:

    Hi,

    I "asset" all images in my debug source (qx/*) and the image is
    displayed without any issues.

    By adding one extra line to my code the warning is gone:

            var s =
    
qx.util.AliasManager.getInstance().resolve("decoration/table/boolean-true.png");

    this.__trueIconUrl = qx.util.ResourceManager.getInstance().toUri(s);

    -> qx.io.ImageLoader.load(this.__trueIconUrl, function (source,
    entry) { }, this);

    For all my own pngs I don't need to do anything special, just for
    these core-Qooxdoo images.

    Debugging from VS 2012 I use the built in debug WebServer.


Mh, what I don't get is you are not juggling image URLs for fun, so sooner or later you would want to download the corresponding images to the browser. Are you getting the warnings you talked about *before* or *after* loading the images?

Or in other words: Does the issue come up without any image loading, just by handling information *about* the images in the runtime? If that is the case I would ask you to check the image information in the image registry. E.g. set a 'debugger' statement in the code you quoted. When the break point is hit, go to the browser console and type

  qx.util.ResourceManager.getInstance().getImageFormat(s);

it should report "png".

As for mime-types, you can always check a resource mime-type in the browser console (like CDT or Firebug), to see what the server delivered. I don't know anything about VS, though.

T.




Best regards,

Jeroen

*From:*thron7 [mailto:thomas.herchenroe...@1und1.de]
*Sent:* donderdag 7 november 2013 13:50
*To:* qooxdoo Development
*Subject:* Re: [qooxdoo-devel] ImageLoader: Not recognized format of external image...

On 11/07/2013 01:10 PM, Jeroen Smit wrote:

    Hi,

    I implemented a cell rendered to be able to show a checkbox for a
    boolean column.

    In code I use default Qx images and cache the uri's using:

    vars =
    
qx.util.AliasManager.getInstance().resolve("decoration/table/boolean-true.png");

    this.__trueIconUrl = qx.util.ResourceManager.getInstance().toUri(s);

    s =
    
qx.util.AliasManager.getInstance().resolve("decoration/table/boolean-false.png");

    this.__falseIconUrl = qx.util.ResourceManager.getInstance().toUri(s);

    In debug mode (using F7) I see a lot of warnings stating:

    ImageLoader: Not recognized format of external image
    
"qooxdoo-3.0.1-sdk/framework/source/resource/qx/decoration/Modern/table/boolean-true.png"

    What am I doing wrong here?


For one thing, all resources must be covered by appropriate @asset hints so they get registered with the qooxdoo runtime. In the file containing the above code, you could add in the file-level JSDoc comment something like

  * @asset(qx/decoration/Modern/table/boolean-true.png)

This will get you rid of the "external image" or "unmanaged resource" warnings.

As for the unrecognized format, how do you serve your app? Through a web server? Which mime-type does it report with the image file?

T.




------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk




_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net  
<mailto:qooxdoo-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk


_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to