![]() |
JAVA programmer? (and Win-DomMap, and some GIMP)
This site has a blur class, and a map render program. It would be great if someone could look at it and see if it will fill our needs to map-making
http://www.jhlabs.com/index.html Can the blur run stand-alone? Batch mode? on linux? process targa files? be told to not blur white pixels (255/255/255)? be told 3 colors to avoid? [ February 24, 2004, 19:33: Message edited by: Gandalf Parker ] |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
This filter won't run on itself. It's a class that can be used in conjunction with the Java Advanced Imaging API (JAI). It would be quite easy to implement a filter that does the thing's you mentioned though. But it only works with BMP, GIF (decoder only), FlashPix (decoder only), JPEG, PNG, PNM, TIFF, and WBMP.
For running java programs you need to have at least the JRE installed. Set some enviroment variables and you can (almost) use it like a native executable. |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
Quote:
Examples of the maps Im working with are at http://www.techno-mage.com/~dominion...s2/RandomMaps/ And you can email me as gandalf@ that site or community.net (or a dozen others) http://forum.shrapnelgames.com/images/icons/icon7.gif |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
Before I spend my day working on Java (again) may I suggest something else? Try ImageMagick. It might be just what you are looking for. If you're running Linux it's probably already installed... I'm not very experienced in using it but it is *very* powerful. I use it for on the fly generation of thumbnails on my webserver.
I browsed the Online docu and there is a blur filter and an option to select a specific set of colors. I haven't tried it but it seems like this should work. |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
If you can point me to a site that explains the PNM format and a sample image, I can give it a go.
|
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
Quote:
The JPG exists for web viewing and so that WebMagick can make thumbnails (which does use imagemagick to do it). I did see that ImageMagick had a blur switch but didnt see where I could hold 255/255/255 white aside. Maybe something where I could copy the white pixels to another file then merge it back after the blur? Of course these are also all work-arounds for the old DomMap program which is in C source code if anyone is interested. [ January 31, 2004, 17:22: Message edited by: Gandalf Parker ] |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
If I'm correct you can use the map switch. Give it a color map file to select specific colors (I'm totally clueless about the file format though). Pass that output to the matte channel. You might have to create a temp file for that.
In the docs there's an example about using a matte channel to filter only certain areas of the image. |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
Quote:
Please send me the source code when you get a chance. I'd like to take a look at it. I'm a bit late to this party. Why are we looking for a blur filter? gladestrider |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
PhilD is managing the source code now. The Last batch of changes were his. He has pretty much gotten it to create maps which will work for Dom2. His Version is Linux only and there are people who would love to get just a working Windows compile made available.
The blur story is this. Dom1 had a very restricted use of color. The maps made for Dom2 have a much greater range of allowance. There are alot of possible ways to go as far as making the random maps look much better. But the EASIEST thing Ive found is a blur. In a few steps, using GIMP, I can layer the white capital dots, layer the blue borders in water provinces, layer the brown color used for land borders, blur the rest and then save. I can provide links of the before and after if you wish. With DomMap I can generate 100 maps a day and make them available on my web site. But they are ugly. Ive tried to find a way to automate blurring them while not touching 3 colors (or even 1, the 255/255/255 white capitals). But a better answer would be the fact that DomMap has all that info in an array at one point. There are alot of ways to go. Blur then insert the capital pixels to the file would be one. Id also be interested in whether the C code actually generates a more extensive fractal map then "dumbs it down" to the old Dom1 map format. Such as... does it squeeze everything between height 100-150 into the green tree color because the old Dom1 limited the map to a total of 16 colors? Letting it assign each level to a slight color change could result in a great map. |
Re: JAVA programmer? (and Win-DomMap, and some GIMP)
Found PhilD's link to the newer DomMap code.
http://duchon.philippe.free.fr/dom2/index.html |
All times are GMT -4. The time now is 05:30 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.