Difference between revisions of "Template talk:Item"

From Wurmpedia
Jump to navigation Jump to search
Line 60: Line 60:
  
 
It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the ''imagetype'' keyword at all so I don't know if this could be written more tidy. :\ --[[User:Ulviirala|Ulviirala]] 09:48, 28 May 2010 (UTC)
 
It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the ''imagetype'' keyword at all so I don't know if this could be written more tidy. :\ --[[User:Ulviirala|Ulviirala]] 09:48, 28 May 2010 (UTC)
 +
 +
Lol, ''imagetype'' is a variable I included to make it possible to use any imageformat. I guess it's not really needed anymore and so can safely be removed. I originally  attempted to do what you did, but found that my brain at that time wasn't quite sharp enough to grasp the intricasies needed. So thank you very much for your work here. It is very much appreciated. [[User:Arvid|Arvid]] 14:19, 28 May 2010 (UTC)

Revision as of 07:19, 28 May 2010

Anyone objecting to renaming this template to "Crafted" or "Craftable", since crafted items is what it really is about. My brain keeps demanding that I do it... Arvid 16:29, 15 May 2010 (UTC)

Also I'd really like to rename the categories of "Blacksmithing items" and "Carpentry items" etc. to "Blacksmithing products" and "Carpentry products" etc. Arvid 16:29, 15 May 2010 (UTC)

Bump

If I do not see any objections I will make a mess of this wiki Arvid 03:16, 17 May 2010 (UTC)

No objections --Manny 08:19, 17 May 2010 (UTC)

Image file format

Why did you make the image file format default to JPG? There are next to none jpeg format image files, if any, at least I can't find any File entries in the history for the past 30 days / 500 entries. Resulting in disabling any item template on the wiki showing an image.

The portable network graphics format has been used throughout the wiki, they're of good image quality and moderate file size if the images are saved correctly. I can't see a lot of jpeg format files being uploaded any time soon. A consistent transition would be if the existing png image files were converted and uploaded in advance instead. But then again, for what reason? --Ulviirala 21:42, 24 May 2010 (UTC)

I changed it based on the following correspondence with MrBloodworth:

Quote from: Arvid on 11 May 2010, 06:54:47 How about I make the preferred image format = jpg? Isn't that usually better with regard to the size of the images/screenshots we normally need?

MrBloodworth: Yes, its is the preferred image type for web images and photographs. PNG limits the colors.

I think MrBloodworth has also mentioned something about providing rendered (outside the game) images like he did with the new streetlamps. I was sort of waiting for that (taking in mind that he's busy with other jobs too).

Also I feel many of the images allready on the wiki are too dark and that the items in them doesn't really stand out too well from the background. I many cases I find myself having to strain my eyes a bit much to see what's actually in them (especially regarding the thumbnails). I'd appreciate if contributors would make an effort to provide screenshots taken in bright daylight and where appropriate with sand or similar as background.

If people really feel like, of course we could change the image format back. Arvid 12:42, 25 May 2010 (UTC)

There is zero reason to use PNG over jpg in this situation, all PNG is doing (and has done) on many images is skew and limit the colors. When i got here, for some reasion most players and users think PNG is best, this is a falsehood that seems to have been ingrained into the player base. The only reason to use PNG at this point, is because we have the images already in that format, moving forward JPEG should be used. If i had upload rights, I would have already converted them, all renders from me in the future will be Jpeg, except in the rare occasion we need a transparency.Mrbloodworth


I've talked to MrB and although I don't think that any of the formats could be prefered over the other, I'm okay with uploading future screenshots in the jpeg image format. File size and quality heavily depend on the compression level and type though, you can create a perfect, lossless, large jpeg image or a shabby, compressedtohellandback, tiny jpeg image. While perfect, a png is somewhat larger. Small screenshots don't really suffer from an optimized palette which brings it up to par in file size anyway. So I don't buy the file size or "prefered for web images and photographs" reason just "because everyone is using it". As if a photographer would know about the data compression techniques of image file formats. While this might sound a bit bold, I feel confident about it.

He also said that it was unintended that no more images could be displayed by changing the template because the jpg doesn't exist. After some research I think it might be possible to add a conditional statement that displays an existing JPG or fallback to the PNG version of the image if one exists. I will try to make it happen but can't promise it'll work :) --Ulviirala 06:25, 27 May 2010 (UTC)


Oh that went faster than I expected, I managed to make it happen. I would still choose the Image:Small padlock.png (256 colours optimized octree palette @ 40kb) over the the Image:Small padlock.jpg (compression level 10 (closer to "best quality") at 12kb) though. When comparing both images thoroughful, you will notice the jpeg "smudging" around all edges caused by the compression which only at compression level 1 (37kb image) disappears in this picture. This is why I personally prefer PNG anytime which also has been developed for a web standard. Please consider the course of action for images. --Ulviirala 07:01, 27 May 2010 (UTC)


Aight, this might be the final edit. Unfortunately I couldn't come up with something cleaner and more efficient but it will do the job of helping in the change. Feel free to optimize this if you're more familiar with the wiki markups :)

{{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}
    | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
    | {{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}
        | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
        | [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
    }}
}}

The Pseudocode for this is:

IF a JPG image exists THEN
    Display the JPG
ELSE
    IF PNG image exists THEN
        Display the PNG
    ELSE
        Display redlink for JPG

It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the imagetype keyword at all so I don't know if this could be written more tidy. :\ --Ulviirala 09:48, 28 May 2010 (UTC)

Lol, imagetype is a variable I included to make it possible to use any imageformat. I guess it's not really needed anymore and so can safely be removed. I originally attempted to do what you did, but found that my brain at that time wasn't quite sharp enough to grasp the intricasies needed. So thank you very much for your work here. It is very much appreciated. Arvid 14:19, 28 May 2010 (UTC)