"Preferred" metaphor

Loading

Joined: 2006-05-04
Posts: 1
Posted: Fri, 2006-05-05 09:49

Hello,

I'm looking into developing a module to the Gallery2 and I wonder what dose "Preferred" metaphor stands for?
Although, I see that "derivative" is formed from "preffered" in many places (in the corde), but I fail to understand what is it for.

Could anyone write some lines about it or point me to the documentation or code where it is explained or could be understood.\?

Thank you.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-05-06 05:53

some files (mime types) cannot be viewed directly in a webbrowser. e.g. a WMF image or a PDF document cannot be displayed within a browser. well, you can display a PDF embedded in a browser, but that's another story.
so for files different from .png, .gif and .jpg, there is no simple way to display a representation of them in the browser. we call those formats webviewable and the ones that you cannot view in a standard web browser are non-webviewable.
we could just show a "download this .wmf file" link and that's it.

but we can do better, and that's where we use the preferred derivatives.
so we have an image toolkit like imagemagick which can convert a lot of file formats into another, e.g. it can create an image for each page of a pdf document, or it can convert a .wmf image into a .jpg image.
we call it thumbnails, resizes and preferreds "derivatives" because they are derived from another file, from the original (usually).
a preferred derivative is the entity that we show in the webbrowser instead of the original. it is preferred over the original because the original is not web-viewable.