[Clipart] where to browse clipart images? (looking for VPN diagrams)

Roan Horning roan at horning.us
Sat Nov 10 06:24:29 PST 2007


Jon Phillips wrote:
> On Fri, 2007-11-09 at 08:28 -0600, Jeremy C. Reed wrote:
>   
>> On Fri, 2 Nov 2007, Jon Phillips wrote:
>>     
>>> On Thu, 2007-11-01 at 18:54 -0500, Jeremy C. Reed wrote:

>>> I'd like to help. But I need:
>>>
>>> - access to the data (SVG files, thumbnails if exist). Are they in CVS?
>>>
>>> - point me to the code
>>>       
>
> Roan has been working on and can brief you on this code. Roan, lets get
> this code into SVN...
>
>   
Working on it. I've redesigned it per Jon's thoughts on a generic thumb 
nail ability for all media types handled by CCHost.

Currently the class is called CCResampler, and the function is called 
Thumbnail. See thread: " [Cctools-cchost] function for generating png 
thumbnails from svg files" on this list for details on how the function 
will work. The class it will belong to has changed, but the function 
itself hasn't.

Initially CCResampler will be targeted at SVG files in particular, but 
adding other graphic formats will be relatively easy. The other media 
types will come later.
>> If I can't modify the code, at least I can create all missing thumbnails 
>> and make a simple script to generate static HTML pages for all the tags 
>> that show (img src) the thumbnails. Even if that is not using the ccHost 
>> structure, it is better than nothing.
>>     
>
> The best is to add this to ccHost and work with Roan on this...the other
> big task is import too, if interested...
>
> I think you could help to write some code to iterate across all clipart
> and regenerate thumbnails...Roan, what do you think about Jeremy helping
> this way?
>   
I'm happy for any help. We do need to generate the missing thumbnails. A 
couple policy issues we need to iron out before we go hog wild:

What is the naming convention for our thumbnails?

* I suggest <file_name>-tn<thumbnail size>.png. With the thumb nail size 
right justified and zero padded so they sort nicely in a directory listing.
examples: roan_drawing3-tn128.png, roan_drawing3-tn064.png, etc.

Where should the default thumbnail reside?

* I'm voting for having it reside in the same directory as the svg file.

What is the standard size of the default thumbnail?

* From what I've read it looks like 128px is the suggested default size 
for thumbnails.
See: https://bugs.freedesktop.org/show_bug.cgi?id=3225

Attached to the bug listed above, someone created a shell script to 
generate thumbnails. I haven't tested it. If it does a good job, you 
could use this as a basis for your script to mass generate thumbnails. 
However you do it. I suggest using inkscape as your initial svg to png 
converter. If you want square thumbnails, you will need to use another 
program to pad the shorter side.

On other issues, I don't think we need to generate static pages to 
display the thumbnails. There is some code to display thumbnails already 
in cchost. Currently it calls the svg file in an image (<img >) tag. I 
suggest we first modify the code to call our new png thumbnails instead 
of the svg file. I think the main file that needs modified is: 
"./cctemplates/misc.xml"

We also need to figure out how to listen for certain events, and then 
call the new CCRender:Thumbnail function. As Victor Stone points out:

You want to watch for cchost events
UPLOAD_DONE (to create the thing)
UPLOAD_DELETE (to clear the cache)
FILE_DONE (to watch for file adds/deletes/replaces)

More details are found this thread: 
"http://sourceforge.net/mailarchive/forum.php?thread_name=472D56E6.4060608%40horning.us&forum_name=cctools-cchost"

Thanks,

Roan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/clipart/attachments/20071110/550620aa/attachment.html>


More information about the clipart mailing list