Skip to content

Commit 476d0b7

Browse files
committed
Add a caution that answer to wuic/wuic#20.
1 parent a29181a commit 476d0b7

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/main/asciidoc/tutorials.adoc

+11-7
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,10 @@ is equivalent to `<engine-builder type="EhCacheEngineBuilder">`.
439439
=== Applying sprites best practice
440440

441441
You can easily apply your sprites in http://www.w3schools.com/css/css_image_sprites.asp[css].
442-
However, combining your images takes time. This tutorial shows how WUIC help developers to generate sprites.
442+
However, combining your images takes time. This tutorial shows how WUIC helps developers to generate sprites.
443+
444+
CAUTION: WUIC can pack a set of `PNG` image only. Other format like `JPEG` will be just ignored by the `ImageAggregatorEngine`.
445+
Consequently if you want to include image in a format other than `PNG` you will need to convert them before.
443446

444447
=== The heap to gather your images
445448

@@ -483,12 +486,13 @@ the generation of javascript sprites.
483486
</engine-builders>
484487
----
485488

486-
Where you finally import your "img" workflow, you can use in Javascript WUIC_SPRITE['img_foo'] and WUIC_SPRITE['img_bar'] to get an object with following properties:
487-
- x: x-position from the left inside the merged image
488-
- y: y-position from the top inside the merged image
489-
- w: the image width
490-
- y: the image height
491-
- url: the image URL
489+
Where you finally import your `img` workflow, you can use in Javascript `WUIC_SPRITE['img_foo']` and `WUIC_SPRITE['img_bar']` to get an object with following properties:
490+
491+
* x: x-position from the left inside the merged image
492+
* y: y-position from the top inside the merged image
493+
* w: the image width
494+
* y: the image height
495+
* url: the image URL
492496

493497
For http://gwennaelbuchet.github.io/SceneGraph.js[SceneGraph] users, you can use this https://github.com/wuic/wuic-samples/blob/wuic-0.5.x-snapshot/js-sprite-sample/src/main/webapp/cgsg/ext/WUICCGSGNodeImageFactory.js[factory]
494498
and generate a `CGSGNodeImage` like this:

0 commit comments

Comments
 (0)