Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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.

Posted

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.

Posted

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....)

Posted

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

Posted

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...

Posted

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

Posted

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.

  • 2 weeks later...
Posted

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.

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...