[Again]ImageReader et .gif

2005-10-15 Thread Philippe Guillard

Bonjour,

J'ai choisi une strategie simple pour sortir les images de mes 
utilisateurs depuis database: ImageReader pour le jpg, et resource 
reader pour le gif.
Seulement je ne vois toujours pas comment proceder. Quelqu'un peut-il me 
dire ce qu'il en pense?


1. L'ideal serait de faire un match dans la sitemap selon l'extension 
.gif-resource reader, .jpg- ImageReader. Mais ces images viennent de 
ma DB, et je ne connais pas encore l'extension (example ci dessous)

(Je ne vois pas comment inserer un check entre 2 pipelines comme ceux la)
2. L'autre solution serait d'etendre ImageReader pour detecter le gif et 
dans ce cas le sortir tel quel. Hum pas si simple.


   map:match pattern=photo/*   !-- example photo/100 (100 est la 
clef primaire dans la database)
   map:read type=image src=cocoon:/photoDB/{1} 
mime-type=image/jpeg
   map:parameter name=width value=102/ 
   map:parameter name=height value=76/ 
   /map:read

   /map:match
  
   map:match pattern=photoDB/*  
   map:read type=databasereader src={1}

   map:parameter name=table value=IMAGE/
   map:parameter name=image value=image/
   map:parameter name=key value=idimage/
   /map:read
 /map:match

3. L'autre solution serait de sortir le nom plus l'extension de mes 
images dans mes pages, mais j'utilise hibernate avec des class lazy, 
aller chercher l'id de l'image ne me coute rien, aller chercher son 
extension me fait charger le bean en entier avec l'image pour pas grand 
chose, puisque le browser va charger l'imagine dans un autre request...


Phil


Philippe Guillard wrote:


Merci
Phil

Frédéric Glorieux wrote:




Oups je n'avais pas vu ces mails en effet. Merci Frederic.
Je serais pas contre de voir le code de l'action en effet, mais 
avant je crois je dois verifier mon besoin:
Je voudrais surtout en savoir plus sur le probleme de perf 
d'ImageReader : je ne gere max qu'une photo personnelle sur la page 
perso de chaque user, et pas un album, donc j'espere  beaucoup 
d'images, mais jamais 2 par page. Crois tu qu'ImageReader pourrait 
etre acceptable pour cela?




Une image par page, peu de risques de problèmes, sauf si 20 personnes 
en même temps se connectent dans la même seconde, et que la JVM est 
limitée à 64Mo. Après la première demande, l'image est bien mise en 
cache par cocoon, ce n'est plus le problème de l'ImageReader.


Un problème qui reste, l'ImageReader ne supporte pas nativement le gif.

Notre choix d'ImagMagick nous a permis de résoudre facilement ce 
problème.


Pour des autres librairies JAVA, le fil cité parle un peu de JAI, il 
faut avoir envie, sinon j'ai déjà pu tester

http://schmidt.devlib.org/jiu/documentation.html.

En exploitation, j'ai tiré du bon code pour trouver les octets 
magiques qui déterminent le format d'une image 
http://schmidt.devlib.org/image-info/index.html (sur le flux 
d'octets, sans charger un pixel).


(par contre je crois etre tombe sur cette situation similaire a ce 
que tu decris dans ces mails avec une image vide qui semble rester 
cachee quelquepart et peut etre comme j'ai lu par firefox...)




C'est vrai qu'un problème serveur peut se résoudre, mais on n'a pas 
la main sur la cache du client. Je n'ai pas trouvé de méthode pour 
éviter l'effet d'une réponse 200 de Cocoon/Tomcat, quand il y a un 
out of memory.






-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]






-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



DITA and Cocoon

2005-10-15 Thread Combinational Logic








The Darwin Information Typing Architecture (DITA) is
an OASIS XML standard for technical documentation created by IBM. Im
wondering if anyone on this list is/has/or is interested in creating a DITA
wiki-like knowledge system upon Cocoon using XMLDB and CForms? I did some
searching and couldnt find anything mixing DITA and Cocoon quite surprising
since this seems like a natural fit.



Some links on DITA

http://www-128.ibm.com/developerworks/xml/library/x-dita1/

http://dita-ot.sourceforge.net/

http://docs.oasis-open.org/dita/v1.0/langspec/ditaref-type.toc.html










Re: DITA and Cocoon

2005-10-15 Thread J.D. Williams
I use DITA and Cocoon for my own Web site as a way of exploring both. 
I'd be interested in discussing a possible collaboration offline.


Joe

Combinational Logic wrote:
The Darwin Information Typing Architecture (DITA) is an OASIS XML 
standard for technical documentation created by IBM.  I’m wondering if 
anyone on this list is/has/or is interested in creating a DITA wiki-like 
knowledge system upon Cocoon using XMLDB and CForms?  I did some 
searching and couldn’t find anything mixing DITA and Cocoon… quite 
surprising since this seems like a natural fit.


 


Some links on DITA

http://www-128.ibm.com/developerworks/xml/library/x-dita1/

http://dita-ot.sourceforge.net/

http://docs.oasis-open.org/dita/v1.0/langspec/ditaref-type.toc.html

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DITA and Cocoon

2005-10-15 Thread Bertrand Delacretaz

Le 15 oct. 05, à 17:21, J.D. Williams a écrit :

I use DITA and Cocoon for my own Web site as a way of exploring both. 
I'd be interested in discussing a possible collaboration offline...


Note that it doesn't have to be off-list, discussions about DITA 
wouldn't be off-topic here I think - and others might be interested in 
your experiences.


-Bertrand


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DITA and Cocoon

2005-10-15 Thread Ross Gardler

Bertrand Delacretaz wrote:

Le 15 oct. 05, à 17:21, J.D. Williams a écrit :

I use DITA and Cocoon for my own Web site as a way of exploring both. 
I'd be interested in discussing a possible collaboration offline...



Note that it doesn't have to be off-list, discussions about DITA 
wouldn't be off-topic here I think - and others might be interested in 
your experiences.


Yes, the Forrest community want to build a DITA input plugin, this is 
actually needed by the Derby project here in Apache. I did do some 
preliminary exploration with the Derby folk, who provided some useful 
info and links. Please keep the discussion on list so that we can bring 
it all together.


Ross


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]