Jump to content
The Dark Mod Forums

Gimpy's Application


New Horizon

Recommended Posts

Yeah well when you think about it, TGA is a really DUMB format for displaying on the web :)

 

The solution could only involve some sort of automated batch process that generates JPG thumbnails of all the TGA files, and any new ones added. Wether that happens automatically when you add them, or someone has to run the update on the new ones, is another story.

Link to comment
Share on other sites

found it! :D

its just not in the common lists. image/x-targa

 

the only reason im doing tga is because its in the format you use, right?

you dont really need tumbnails if your description is good enough, i will have a search function.

 

I'll have a look to see if PHP can convert tga's to another web-friendly format.

Link to comment
Share on other sites

I found a way of converting tga files into jpg's.

ive never used this function before but it looks do-able.

 

im going to need an actual tga file your using in-game so i can see if it converts correcty (not upside down and back to front....)

Link to comment
Share on other sites

There is an appliction on linux which can convert and process all kind of images. That's why I added the path option on the type setting. To either specify a path to a default thumbnail or to an application that will create the thumbnail. I guess we should name the thumbnail the same as the file itself with the extension replaced by thn (or something). On unix this is pretty easy to do anyway, because in worst case I can provide a script wrapper that returns that creates the thumbnail by calling the appropriate script.

Gerhard

Link to comment
Share on other sites

great, if php cant handle it then we have a few alternative forms of conversion.

hell, if we really need too running php from the command line for image batch conversions every 30 seconds or so would work...

Link to comment
Share on other sites

You don't need to run it every 30 seconds. Just once when an image is uploaded.

 

My idea was like this (just examples):

 

Create a type TGA Image.

Specify the extension.

Specify the application that will create the thumb.

 

Create a type WAV file.

Specify the extension.

Specify the the default thumb.

 

Create as many types as we need...

 

That reminds me. It must be possible to upload a custom thumb, because of the models. We can not create a thumbnail of a model, so we have to provide the appropriate image. Or we can ignore models and just store the images instead, which wouldn't matter since we don't want to store the actual files anyway as they are already in CVS.

 

Now when you want to upload a file it looks for the extension (ignoring the case because Unix is case senstive) and provides the appropriate type (or the user has to select it). Then when it is uploaded the application is called which will create the thumb and store it in the database. If it is the default thumbnail it doesn't need to create it, instead it just inserts the path to the default in the DB instead of the real thumbnail.

 

Pretty straigthforward IMO.

Gerhard

Link to comment
Share on other sites

as i said, ive already got the option to upload a separate thumbnail in bmp or jpeg format.

Im just trying to make the web application intelligent enough to convert the uploaded texture into a jpeg thumbnail IF there was no thumbnail uploaded with it.

Link to comment
Share on other sites

  • 2 weeks later...

ok, just a quick update. (im going on holiday today, just for a week)

 

i got my server and webhosting, like I said.

 

once i get back, i will upload what ive been able to do for you to this address:

 

http://darklibrary.nanoweb.net.au

 

if you visit that page now, all you'll get is what ive had the time to do lately. most of that stuff wont work anyway as mysql isnt setup yet.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...