Re: [xwiki-users] How do I for divide one string I need only the part of the user name (Admin) instead of XWiki.Admin
Ricardo, If you agree to work with "outdated projects", why not consider the project: http://svn.activemath.org/intergeo/Platform/Vignettes/ It's referencing old xwiki things because that's where curriki holds me but is otherwise giving me the edit luxury for groovy and velocity. It builds applets, per default (it's an applet-based screenshot uploader) but it also contains the source of an xwiki application. It also has src/main/pages/VignettesCode/ which contains source files in groovy and velocity languages and editing with intelliJ there gives me all the code-completions. I believe the project does not have "personal dependencies" but I could be wrong. The main visible output page being: http://i2geo.net/xwiki/bin/view/VignettesCode/CarouselHtml To upload I use my own post script (http://svn.activemath.org/intergeo/Platform/bin/upload-to-wiki) or simply and quite often copy and paste. paul PS: the project does not build a xar which would require those uneditable xml files or a modification to the plugin or xml infrastructure (xinclude probably) so that the .vm and .groovy are still kept, which is essential for editing luxury. Le 21 sept. 2010 à 07:57, Paul Libbrecht a écrit : >> Let's go back to the initial question: what I was looking for was how to >> "read" all available properties of a given "object" with a "piece of >> code" within a XWiki page. I think I'm not able yet to use the right >> concepts and the right words when taking about, in general, >> object-oriented programming. I think that what you have gone several >> steps further and give me/us some nice keys about how to do that >> "programmatically" from within your favourite IDE. This will allow >> anybody using this environment to get auto-completion. > > I summarize it all as the autocompletion function. > You type $xxx then dot (".") then get a popup... that popup is based on what > is known as type. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Migrating Xwiki
Many thanks Ricardo!! Let me play around first and see how this thing handles then hopefully I'll have a properly functioning wiki after the migration :-) The howto will be posted on it directly as are many other howto's already.. Best regards, Kaya On 20/09/2010 20:08, [Ricardo Rodriguez] eBioTIC. wrote: > Hi! > > Kaya Saman wrote: > >> I can keep the Postgres database that isn't a problem as it's available >> on all platforms. However, when you say that Xwiki should be the same >> release I was hoping to just copy the webapps/xwiki container as if I'm >> not mistaken the xwiki.war file that I'm using gets extracted by >> Tomcat/Glassfish or other which fully contains the Xwiki instance minus >> the DB??. >> >> >> > Minus the DB, and any edit file! Be careful with xwiki.cfg, > hibernate.cfg.xml, any edit Velocity (*.vm) template and any library you > have copied to WEB-INF/lib (for instance, MySQL connector must be copied > there to allow XWiki to access a MySQL database). > > >> Moving that should keep everything in check with a few additions to the >> hibernate.cfg.xml file if changing database! .I presume as I need to >> test this out fully first before things blow up in my face! >> >> >> > I insist: remember to back-up xwiki.cfg and take not of what > extra-libraries you are using! > > Cheers, > > Ricardo > > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How do I for divide one string I need only the part of the user name (Admin) instead of XWiki.Admin
Paul Libbrecht wrote: > > The grant would be for the xwiki development, not for xwiki applications. > I think I saw there was one long ago. > Your product should be open-source. > > Yes, yes! I meant I'm not the one to propose XWiki devs to apply for such a grant! :-) >> I must recognize that I am a bit of a mess when talking about variables, >> properties, methods, objects and stuff! >> >> Let's go back to the initial question: what I was looking for was how to >> "read" all available properties of a given "object" with a "piece of >> code" within a XWiki page. I think I'm not able yet to use the right >> concepts and the right words when taking about, in general, >> object-oriented programming. I think that what you have gone several >> steps further and give me/us some nice keys about how to do that >> "programmatically" from within your favourite IDE. This will allow >> anybody using this environment to get auto-completion. >> > > I summarize it all as the autocompletion function. > You type $xxx then dot (".") then get a popup... that popup is based on what > is known as type. I'm afraid I'm lost again... by saying "based on what is know as type" you mean that we'll get all methods for a given class? all properties? For instance, if i type $xwiki. will I get all methods of this class? All its properties? I know, I can't learn Java by asking here all I don't know! But it is really useful to make this kind of questions, and get them answered!, to better understand the concepts I found defined in many places in Internet or asking colleagues. At least for me is quite difficult to know what is wrong, ill-defined or correct in that ocean of information! Thank you so much! -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How do I for divide one string I need only the part of the user name (Admin) instead of XWiki.Admin
Thanks! Paul Libbrecht wrote: > Ricardo, > > > If you agree to work with "outdated projects", why not consider the project: > http://svn.activemath.org/intergeo/Platform/Vignettes/ > It's referencing old xwiki things because that's where curriki holds me but > is otherwise giving me the edit luxury for groovy and velocity. > > It builds applets, per default (it's an applet-based screenshot uploader) but > it also contains the source of an xwiki application. > > It also has src/main/pages/VignettesCode/ which contains source files in > groovy and velocity languages and editing with intelliJ there gives me all > the code-completions. I believe the project does not have "personal > dependencies" but I could be wrong. > I'm afraid my skills are still far from required to be involve in such a project! But I keep trying! I know, I've already said this before... but, you know, kids, banks,... :-) I'll catch up! > The main visible output page being: > http://i2geo.net/xwiki/bin/view/VignettesCode/CarouselHtml > To upload I use my own post script > (http://svn.activemath.org/intergeo/Platform/bin/upload-to-wiki) or simply > and quite often copy and paste. I'll take a look to the project ASAP and come back with doubts. I remember your project which I reach some years ago following thread discussions here and in the devs list. I'm not involved with any Geometry problem, but Multivariate Statistics is currently one of my main concerns. The objective is to be able to collaboratively develop, document and submit R (http://www.r-project.org/) scripts within an XWiki environment. We have a lot of happy XWiki users, all of them requires some kind of statistical analysis for their work. So, to be able to capture and document the process of generation of knowledge associated with statistical analysis will be a "killer application" (I do like this concept :-) here. And, of course, this would be a Curriki project as well: we want to teach that! I'm sure I/we can learn a lot from the i2geo project! Keep in touch! Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How do I for divide one string I need only the part of the user name (Admin) instead of XWiki.Admin
Ricardo, I am suggesting this project not for you to get involved but for the virtues of an example: - check it out - import it in IntelliJ - see if you can edit with luxury The vignettes project is a simple (sub-)project of i2geo. paul Le 21 sept. 2010 à 10:10, [Ricardo Rodriguez] eBioTIC. a écrit : > Thanks! > > Paul Libbrecht wrote: >> Ricardo, >> >> >> If you agree to work with "outdated projects", why not consider the project: >> http://svn.activemath.org/intergeo/Platform/Vignettes/ >> It's referencing old xwiki things because that's where curriki holds me but >> is otherwise giving me the edit luxury for groovy and velocity. >> >> It builds applets, per default (it's an applet-based screenshot uploader) >> but it also contains the source of an xwiki application. >> >> It also has src/main/pages/VignettesCode/ which contains source files in >> groovy and velocity languages and editing with intelliJ there gives me all >> the code-completions. I believe the project does not have "personal >> dependencies" but I could be wrong. >> > > I'm afraid my skills are still far from required to be involve in such a > project! But I keep trying! I know, I've already said this before... > but, you know, kids, banks,... :-) I'll catch up! >> The main visible output page being: >> http://i2geo.net/xwiki/bin/view/VignettesCode/CarouselHtml >> To upload I use my own post script >> (http://svn.activemath.org/intergeo/Platform/bin/upload-to-wiki) or simply >> and quite often copy and paste. > > I'll take a look to the project ASAP and come back with doubts. I > remember your project which I reach some years ago following thread > discussions here and in the devs list. I'm not involved with any > Geometry problem, but Multivariate Statistics is currently one of my > main concerns. The objective is to be able to collaboratively develop, > document and submit R (http://www.r-project.org/) scripts within an > XWiki environment. We have a lot of happy XWiki users, all of them > requires some kind of statistical analysis for their work. So, to be > able to capture and document the process of generation of knowledge > associated with statistical analysis will be a "killer application" (I > do like this concept :-) here. > > And, of course, this would be a Curriki project as well: we want to > teach that! > > I'm sure I/we can learn a lot from the i2geo project! > > Keep in touch! > > Ricardo > > -- > Ricardo Rodríguez > CTO > eBioTIC. > Life Sciences, Data Modeling and Information Management Systems > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Migrating Xwiki
Welcome! Kaya Saman wrote: > Many thanks Ricardo!! > > Let me play around first and see how this thing handles then hopefully > I'll have a properly functioning wiki after the migration :-) > > The howto will be posted on it directly as are many other howto's > already.. Don't forget to have a lot to ... http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgradinganXWikiInstallation It's "our" responsibility to have these documents updated and make them as useful as possible! Greetings, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Documents and classes design question
Hi, On Mon, Sep 20, 2010 at 11:12 PM, [Ricardo Rodriguez] eBioTIC. wrote: > Thanks, Raluca, > > Raluca Stavro wrote: >> On Mon, Sep 20, 2010 at 9:29 AM, Raluca Stavro >> wrote: >> >>> On Sat, Sep 18, 2010 at 12:38 PM, [Ricardo Rodriguez] eBioTIC. >>> wrote: >>> Hi, >>> >>> You can use translations (See >>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications). >>> For class properties, the translation format is like this: >>> >>> ClassSpaceBane.ClassDocName_propertyName=A_Translation_Text >>> >> >> ClassSpaceName.ClassDocName_propertyName=A_Translation_Text >> >> > I'm in fact using this method in a rather simple application we have > created, but whereas it is rather simple to edit and fill-in properties > in a given instantiate class, it is not so "straight" to use the method > we talk about here to the same. For instance, consider this (awful, but > it could be useful to illustrate the discussion) model... > > http://ftp.ebiotic.net/onPdr/pescaderiasDataModel.png > > I've implemented it by using Documents to instantiate User and Species > classes. Species classes has two properties that hold translations of > its name. If I manage to get a new translation, I do need to add a new > property to this class. Or to instruct translators to edit the > translations document and fill in the property the name of the variable > in the format you have told before. I do prefer not to have people to > tweak with this kind of "raw" XWiki documents. > > Could it be possible to create a new class for each name to be > translated and instatiate it such many times as different languages a > given name is translated to? This class will have two properties: > Language Code and Translation. WDYT? > > I think all I have to do is to understand how http://l10n.xwiki.org > works! But I think this is a bit far from my capabilities rigth now! As > stated in some other message, any entry-level help will be welcome! See this document in order to learn the basics of the translations module: http://platform.xwiki.org/xwiki/bin/view/Features/I18N . A trick to solve your problem would be to have a single 'name' property for the 'Species' class. Let's say that you attached an object of type 'YourSpace.Species' class to a document named 'YourSpace.DocName'. You set the value of the 'name' property to 'sp_name_key' (use a key in order to be able to use translations based on it). Edit the document in wiki mode and write: {{velocity}} #set($thisDocSpeciesNameKey = $doc.getObject('YourSpace.Species').getProperty('name').value) ## $thisDocSpeciesNameKey value is 'sp_name_key' $msg.get("$!thisDocSpeciesNameKey") {{/velocity}} ## save the document In the translations document, for the 'en' version you write the key & value like this: sp_name_key=my EN sp name ## save the document For the 'fr' version, you write this: sp_name_key=my FR sp name ## save the document Now, if you go to .../view/YourSpace/DocName (your document in 'view' mode), by changing the language you will see that the displayed name is different for each language. Raluca. > > Thanks! > > -- > Ricardo Rodríguez > CTO > eBioTIC. > Life Sciences, Data Modeling and Information Management Systems > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] How do I for divide one string I need only the part of the user name (Admin) instead of XWiki.Admin
Paul Libbrecht wrote: > Ricardo, > > I am suggesting this project not for you to get involved but for the virtues > of an example: > - check it out > - import it in IntelliJ > - see if you can edit with luxury > The vignettes project is a simple (sub-)project of i2geo. Got! Thanks! -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Document concept
Hi, On Tue, Sep 21, 2010 at 1:37 AM, [Ricardo Rodriguez] eBioTIC. wrote: > Hi, > > Please, as an new XWiki *user* is created as a new instance of > XWiki.XWikiUser class, what class is instantiated to create a new XWiki > *document*? There is a difference between XWiki classes and Java classes. 'XWiki.XWikiUsers' class is an XWiki class and when a new user is created, a new XWiki document is created and an object of type 'XWiki.XWikiUsers' is attached to that XWiki document. A default XWiki document has no object of an XWiki class type attached. But, any XWiki instance is built on the top of the XWiki platform - written in Java (see the API reference: http://platform.xwiki.org/xwiki/bin/view/DevGuide/API/) . So, an XWiki document is an instance of type Document (see Document class inside the platform API). Raluca. > > Thanks! > > -- > Ricardo Rodríguez > CTO > eBioTIC. > Life Sciences, Data Modeling and Information Management Systems > > ___ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Documents and classes design question
Thanks, Raluca. Raluca Stavro wrote: > See this document in order to learn the basics of the translations > module: http://platform.xwiki.org/xwiki/bin/view/Features/I18N . > > A trick to solve your problem would be to have a single 'name' > property for the 'Species' class. > Let's say that you attached an object of type 'YourSpace.Species' > class to a document named 'YourSpace.DocName'. > You set the value of the 'name' property to 'sp_name_key' (use a key > in order to be able to use translations based on it). > Edit the document in wiki mode and write: > {{velocity}} > #set($thisDocSpeciesNameKey = > $doc.getObject('YourSpace.Species').getProperty('name').value) ## > $thisDocSpeciesNameKey value is 'sp_name_key' > $msg.get("$!thisDocSpeciesNameKey") > {{/velocity}} > ## save the document > > In the translations document, for the 'en' version you write the key & > value like this: > sp_name_key=my EN sp name > ## save the document > > For the 'fr' version, you write this: > sp_name_key=my FR sp name > ## save the document > > Now, if you go to .../view/YourSpace/DocName (your document in 'view' > mode), by changing the language you will see that the displayed name > is different for each language. I think I see how this works. I'll implement sample here. I'm already using this method for panels, but I've never used it for class properties. But, in any case, I'll also try to write a model for using a kind of "translation class". Is the application available at http://l10n.xwiki.org working the way you describe? Thanks! Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki Export, Page content as HTML?
Hi all Please excuse this first junk and see first email below. I am sending from my mobile so editing difficult Gordon -Original Message- From: users-ow...@xwiki.org Sender: users-boun...@xwiki.org Date: Tue, 21 Sep 2010 15:16:47 To: Subject: XWiki Export, Page content as HTML? You are not allowed to post to this mailing list, and your message has been automatically rejected. If you think that your messages are being rejected in error, contact the mailing list owner at users-ow...@xwiki.org. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XWiki Export, Page content as HTML?
Hi! gor...@yilaconsulting.com wrote: > Hi all > > Please excuse this first junk and see first email below. I am sending from my > mobile so editing difficult > > Gordon > -Original Message- > From: users-ow...@xwiki.org > Sender: users-boun...@xwiki.org > Date: Tue, 21 Sep 2010 15:16:47 > To: > Subject: XWiki Export, Page content as HTML? I'm afraid that your mobile has cropped the content of your message in some way! Please, resend. Cheers, Ricardo -- Ricardo Rodríguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] [Vote] Resize images on the server side to reduce page loading time
On 09/08/2010 10:40 PM, Marius Dumitru Florea wrote: > Hi devs, > > Currently the image plugin [1] allows us to create image thumbnails by > specifying the image width and/or height in the query string of the > image attachment download URL: > > /xwiki/bin/download/Spage/Page/image.jpg?width=100 > > I propose that we: > > (A) Use the image width and/or height (when they are specified in the > image syntax using pixel unit) to resize the image on the server side. > For instance: > > [[image:logo.jpg||width="100px"]] > > will be linked to > > /xwiki/bin/download/Spage/Page/logo.jpg?width=100 > > and > > [[image:logo.jpg||style="height: 50px; width: 70px"]] > > will be linked to > > /xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50 +1. > The image plugin also accepts a quality parameter that controls the > compression quality when encoding jpeg images. The default value of this > parameter (i.e. when not specified in the URL) is configurable. I > propose we use 0.3 by default, 1 representing the best quality. 0.3 seems very low to me. The resulting image has serious artifacts, which can be ignored for low-level photographs, but which is unacceptable if the images are technical. I think that we should try to give less artifacts. One option would be to use the same quality as the original image, but I don't know if the JDK has APIs for reading this information from the picture, although it can be obtained by parsing the raw image. The simpler thing would be to use something in the middle, 0.5? > (B) Add the ability to limit the image dimensions (preserving aspect > ratio) when the image width and/or height are not specified in the image > syntax (or when they are not using pixel unit). The width and height > limit will be configurable and -1 by default (i.e. no limitation). For > instance: > > image:logo.jpg > > will be linked to > > /xwiki/bin/download/Spage/Page/logo.jpg?width=1024 > > when width limit is 1024, and to > > /xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true > > when width limit is 1024 and height limit is 768. Note that in this case > the image aspect ratio is preserved. The image is resized to best fit > the limits. If the user want to bypass the limit he has to specify the > image width/height in the image syntax. I'm not sure of this. How do you get the original image back? > I'm +1 for both (A) and (B). WDYT? > > Thanks, > Marius > > [1] > http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] [Vote] Resize images on the server side to reduce page loading time
Hi Sergiu, On 09/21/2010 08:27 PM, Sergiu Dumitriu wrote: > On 09/08/2010 10:40 PM, Marius Dumitru Florea wrote: >> Hi devs, >> >> Currently the image plugin [1] allows us to create image thumbnails by >> specifying the image width and/or height in the query string of the >> image attachment download URL: >> >> /xwiki/bin/download/Spage/Page/image.jpg?width=100 >> >> I propose that we: >> >> (A) Use the image width and/or height (when they are specified in the >> image syntax using pixel unit) to resize the image on the server side. >> For instance: >> >> [[image:logo.jpg||width="100px"]] >> >> will be linked to >> >> /xwiki/bin/download/Spage/Page/logo.jpg?width=100 >> >> and >> >> [[image:logo.jpg||style="height: 50px; width: 70px"]] >> >> will be linked to >> >> /xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50 > > +1. > >> The image plugin also accepts a quality parameter that controls the >> compression quality when encoding jpeg images. The default value of this >> parameter (i.e. when not specified in the URL) is configurable. I >> propose we use 0.3 by default, 1 representing the best quality. > > 0.3 seems very low to me. The resulting image has serious artifacts, > which can be ignored for low-level photographs, but which is > unacceptable if the images are technical. I think that we should try to > give less artifacts. > > One option would be to use the same quality as the original image, but I > don't know if the JDK has APIs for reading this information from the > picture, although it can be obtained by parsing the raw image. The > simpler thing would be to use something in the middle, 0.5? The default compression quality is configurable. The question is what do we favor by default: performance or quality? > >> (B) Add the ability to limit the image dimensions (preserving aspect >> ratio) when the image width and/or height are not specified in the image >> syntax (or when they are not using pixel unit). The width and height >> limit will be configurable and -1 by default (i.e. no limitation). For >> instance: >> >> image:logo.jpg >> >> will be linked to >> >> /xwiki/bin/download/Spage/Page/logo.jpg?width=1024 >> >> when width limit is 1024, and to >> >> /xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true >> >> >> when width limit is 1024 and height limit is 768. Note that in this case >> the image aspect ratio is preserved. The image is resized to best fit >> the limits. If the user want to bypass the limit he has to specify the >> image width/height in the image syntax. > > I'm not sure of this. How do you get the original image back? Either you set the width/height limit to -1 or to a reasonable large number in the configuration or you specify the original image width/height in the image wiki syntax. Alternatively you can create a link to the original image with: [[image:logo.jpg>>attach:logo.jpg]] Note that image width/height limit are -1 by default in the standard XE distribution. Their purpose it to limit image width/height in wikis where users upload large images that can't be display in their full size on a web page (e.g. 3648 x 2736 px). In this case a link to the original image is enough. Thanks for the feedback, Marius > >> I'm +1 for both (A) and (B). WDYT? >> >> Thanks, >> Marius >> >> [1] >> http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ >> > > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] [Vote] Resize images on the server side to reduce page loading time
On 09/21/2010 07:58 PM, Marius Dumitru Florea wrote: > Hi Sergiu, > > On 09/21/2010 08:27 PM, Sergiu Dumitriu wrote: >> On 09/08/2010 10:40 PM, Marius Dumitru Florea wrote: >>> Hi devs, >>> >>> Currently the image plugin [1] allows us to create image thumbnails by >>> specifying the image width and/or height in the query string of the >>> image attachment download URL: >>> >>> /xwiki/bin/download/Spage/Page/image.jpg?width=100 >>> >>> I propose that we: >>> >>> (A) Use the image width and/or height (when they are specified in the >>> image syntax using pixel unit) to resize the image on the server side. >>> For instance: >>> >>> [[image:logo.jpg||width="100px"]] >>> >>> will be linked to >>> >>> /xwiki/bin/download/Spage/Page/logo.jpg?width=100 >>> >>> and >>> >>> [[image:logo.jpg||style="height: 50px; width: 70px"]] >>> >>> will be linked to >>> >>> /xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50 >> >> +1. >> >>> The image plugin also accepts a quality parameter that controls the >>> compression quality when encoding jpeg images. The default value of this >>> parameter (i.e. when not specified in the URL) is configurable. I >>> propose we use 0.3 by default, 1 representing the best quality. >> >> 0.3 seems very low to me. The resulting image has serious artifacts, >> which can be ignored for low-level photographs, but which is >> unacceptable if the images are technical. I think that we should try to >> give less artifacts. >> >> One option would be to use the same quality as the original image, but I >> don't know if the JDK has APIs for reading this information from the >> picture, although it can be obtained by parsing the raw image. The >> simpler thing would be to use something in the middle, 0.5? > > The default compression quality is configurable. The question is what do > we favor by default: performance or quality? Middle? >> >>> (B) Add the ability to limit the image dimensions (preserving aspect >>> ratio) when the image width and/or height are not specified in the image >>> syntax (or when they are not using pixel unit). The width and height >>> limit will be configurable and -1 by default (i.e. no limitation). For >>> instance: >>> >>> image:logo.jpg >>> >>> will be linked to >>> >>> /xwiki/bin/download/Spage/Page/logo.jpg?width=1024 >>> >>> when width limit is 1024, and to >>> >>> /xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true >>> >>> >>> >>> when width limit is 1024 and height limit is 768. Note that in this case >>> the image aspect ratio is preserved. The image is resized to best fit >>> the limits. If the user want to bypass the limit he has to specify the >>> image width/height in the image syntax. >> > >> I'm not sure of this. How do you get the original image back? > > Either you set the width/height limit to -1 or to a reasonable large > number in the configuration or you specify the original image > width/height in the image wiki syntax. Alternatively you can create a > link to the original image with: > > [[image:logo.jpg>>attach:logo.jpg]] OK, this is good. +1 here too. > Note that image width/height limit are -1 by default in the standard XE > distribution. Their purpose it to limit image width/height in wikis > where users upload large images that can't be display in their full size > on a web page (e.g. 3648 x 2736 px). In this case a link to the original > image is enough. > > Thanks for the feedback, > Marius > >> >>> I'm +1 for both (A) and (B). WDYT? >>> >>> Thanks, >>> Marius >>> >>> [1] >>> http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ >>> >>> >> >> > -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [xwiki-devs] [Vote] Resize images on the server side to reduce page loading time
On 09/21/2010 09:16 PM, Sergiu Dumitriu wrote: > On 09/21/2010 07:58 PM, Marius Dumitru Florea wrote: >> Hi Sergiu, >> >> On 09/21/2010 08:27 PM, Sergiu Dumitriu wrote: >>> On 09/08/2010 10:40 PM, Marius Dumitru Florea wrote: Hi devs, Currently the image plugin [1] allows us to create image thumbnails by specifying the image width and/or height in the query string of the image attachment download URL: /xwiki/bin/download/Spage/Page/image.jpg?width=100 I propose that we: (A) Use the image width and/or height (when they are specified in the image syntax using pixel unit) to resize the image on the server side. For instance: [[image:logo.jpg||width="100px"]] will be linked to /xwiki/bin/download/Spage/Page/logo.jpg?width=100 and [[image:logo.jpg||style="height: 50px; width: 70px"]] will be linked to /xwiki/bin/download/Spage/Page/logo.jpg?width=70&height=50 >>> >>> +1. >>> The image plugin also accepts a quality parameter that controls the compression quality when encoding jpeg images. The default value of this parameter (i.e. when not specified in the URL) is configurable. I propose we use 0.3 by default, 1 representing the best quality. >>> >>> 0.3 seems very low to me. The resulting image has serious artifacts, >>> which can be ignored for low-level photographs, but which is >>> unacceptable if the images are technical. I think that we should try to >>> give less artifacts. >>> >>> One option would be to use the same quality as the original image, but I >>> don't know if the JDK has APIs for reading this information from the >>> picture, although it can be obtained by parsing the raw image. The >>> simpler thing would be to use something in the middle, 0.5? >> >> The default compression quality is configurable. The question is what do >> we favor by default: performance or quality? > > Middle? I'm fine with 0.5. Let's see what others think. Thanks, Marius > >>> (B) Add the ability to limit the image dimensions (preserving aspect ratio) when the image width and/or height are not specified in the image syntax (or when they are not using pixel unit). The width and height limit will be configurable and -1 by default (i.e. no limitation). For instance: image:logo.jpg will be linked to /xwiki/bin/download/Spage/Page/logo.jpg?width=1024 when width limit is 1024, and to /xwiki/bin/download/Spage/Page/logo.jpg?width=1024&height=768&keepAspectRatio=true when width limit is 1024 and height limit is 768. Note that in this case the image aspect ratio is preserved. The image is resized to best fit the limits. If the user want to bypass the limit he has to specify the image width/height in the image syntax. >>> >> >>> I'm not sure of this. How do you get the original image back? >> >> Either you set the width/height limit to -1 or to a reasonable large >> number in the configuration or you specify the original image >> width/height in the image wiki syntax. Alternatively you can create a >> link to the original image with: >> >> [[image:logo.jpg>>attach:logo.jpg]] > > OK, this is good. +1 here too. > >> Note that image width/height limit are -1 by default in the standard XE >> distribution. Their purpose it to limit image width/height in wikis >> where users upload large images that can't be display in their full size >> on a web page (e.g. 3648 x 2736 px). In this case a link to the original >> image is enough. >> >> Thanks for the feedback, >> Marius >> >>> I'm +1 for both (A) and (B). WDYT? Thanks, Marius [1] http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/image/ >>> >>> >> > > ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users