Charas-Project

Game Creation => Requests => Topic started by: patricker on August 22, 2012, 01:48:33 AM

Title: Download of all Charas images in normal image format?
Post by: patricker on August 22, 2012, 01:48:33 AM
I'm working on a game in which I build my characters in code, kind of like you do on in the Charas builder.  I download say a body image, take out the green background and make it transparent, do this for other body parts as well, and then combine them on screen.

The problem is downloading files one at a time is tedious.  I tried downloading the Windows Chars.EX program and extracting the pictures from there but the images are compressed and after that they are in a proprietary format from what I can tell.

Is there a download of all the images available in a standard image format?
Title: Re: Download of all Charas images in normal image format?
Post by: fruckert on August 22, 2012, 03:52:22 AM
The Charas.ex files are using a library called FreeImage.
You could probably write a conversion program using the library, depending on what language you're using.
Title: Re: Download of all Charas images in normal image format?
Post by: patricker on August 26, 2012, 08:16:00 PM
fruckert, how sure are you about the FreeImage part?  When I looked through the code it looked like the FreeImage library was used for import and export, but not for reading the images for CharasEX.  Instead the reading is done very manually; the whole file is compressed using a built in compression method using a fairly non-standard compression formation (not zip, or rar, or 7z, something more unusual).  Inside the file there are 8 colors in the header which are used for the custom colors you can define for body parts.  After that comes each pixel in the image, and after that comes the 256 color pallet definition.

With all that said, the only thing stopping me from just grabbing them is the compression, it turns out it's a fairly unusual method and hard to find .NET libraries for it.
Title: Re: Download of all Charas images in normal image format?
Post by: fruckert on August 26, 2012, 08:42:48 PM
Not completely sure.
It looks like it uses a fair bit of the PureBasic base library, which I'm very unfamiliar with.
I didn't even know PureBasic was a thing until I looked at the source for help on a project of mine.

Also, the comments are in German, which doesn't help.

Who knows, maybe Gary'll come in and save the day.
(Gary's one of the co-coders of Charas.EX)
Title: Re: Download of all Charas images in normal image format?
Post by: ambrose1987 on November 06, 2013, 05:03:05 AM
Hope somebody's watching this thread. Here's how you do it, you need wget. If you're on GNU/Linux(not sure about Android) you already have it, Windows users can get it http://gnuwin32.sourceforge.net/packages/wget.htm (http://gnuwin32.sourceforge.net/packages/wget.htm) , and Mac users can use brew or macports to get it. Once it's installed, type this in to a terminal and wait about 20 minutes.

wget -R -A png -m -p -E -K -np http://charas-project.net/ (http://charas-project.net/charas2/)
Title: Re: Download of all Charas images in normal image format?
Post by: patricker on November 08, 2013, 03:25:22 AM
My some turn of fate (?), I had this thread subscribed. Now 2+ years later I still got a notification letting me know you had posted  :bend:

I've used wget before, but don't fully  know the syntax.  It looks like you are saying scrape the site for all png images?  How did this work for you?  Lot of extra garbage too, or mostly just the images in question?
Title: Re: Download of all Charas images in normal image format?
Post by: ambrose1987 on November 08, 2013, 04:17:49 PM
There was an HTML file for for every image retrieved when I did it, but that's just "rm -r *.html" and they're all gone. It also retrieved thumbnails which wasn't great because they're png's too, which makes them more annoying to sort through and delete. But yeah, it basically says "Recursively scrape the site for .png's until you run out of site."