![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member (Java Lover)
Join Date: Feb 2008
Posts: 189
![]() |
I know this issue has been discussed several times, but I still can't find solution for it. Dstile generate jpeg and png, png is too large so I want to use jpeg. but dstile create jpeg with black background for areas which is out of the original extent, which makes map looks so ugly. Have any one found solution for this. Or maybe I am doing this in a wrong way?!!
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jun 2007
Posts: 218
![]() |
Well, jpgs don't support transparency.
![]() Can you use different compression parameters with the png files to make them smaller? |
|
|
|
|
|
#3 |
|
Junior Member (Java Lover)
Join Date: Feb 2008
Posts: 189
![]() |
Right jpeg dosn't support transparency, and dstile has no parameters to make png smaller
|
|
|
|
|
|
#4 |
|
Worldwind Developer
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
![]() |
You can specify black as transparent for JPEG's. The PNG tiling was meant for those who wanted full quality tiles at a smaller size than DDS, so quality is lossless. I can add PNG compression options to the long list already there.
Cheers, what_nick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much. Currently blogging at: http://whatnicklife.blogspot.com Working at: Aerometrex - http://aerometrex.com.au/blog/ Impact so far: ![]() |
|
|
|
|
|
#5 |
|
Junior Member (Java Lover)
Join Date: Feb 2008
Posts: 189
![]() |
Thanks, but how I can specify black as transparent for JPEG's. As I know jpeg doesn't support transperancy
|
|
|
|
|
|
#6 |
|
Junior Member (Java Lover)
Join Date: Feb 2008
Posts: 189
![]() |
Very strange, There is two options, either I am the only one who is facing this problem and no one wants to help, or no one is trying to add his own data using dstile. I am trying to find the solution already 2 weeks no success
|
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Apr 2006
Posts: 407
![]() |
Ah. Java. Thought it was .NET. This has been done before. Anyway, search for 'imagemagic' on the forums here, you should come up with the thread on this from a couple of weeks ago.
__________________
Machine. Unexpectedly, I’d invented a time - Alan Moore |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Jun 2007
Posts: 218
![]() |
I'm pretty sure that with the current WWJ, your options are either to use png or dds or implement your own extension to TiledImageLayer that does a little manipulating of the image data before it passes the BufferedImage off to TextureIO.
I don't think the second sounds too difficult actually, but it's not implemented and talk is cheap. ![]() Or perhaps file a bug report and wait and see if the next WWJ release addresses the issue. If WW.net assumes that RGB (0,0,0) should be transparent, it seems that WWJ probably should too. |
|
|
|
|
|
#9 |
|
Junior Member (Java Lover)
Join Date: Feb 2008
Posts: 189
![]() |
Well, I did some work around, where I am using png with transparency in boundaries and jpeg for all other images.
it works public java.net.URL getURL(gov.nasa.worldwind.util.Tile tile) throws MalformedURLException { Sector sec = tile.getSector(); boolean equal = true; String thePath = "";//Path to images java.net.URL urlx = null; if (sec.getMinLatitude().degrees< originalSecror.getMinLatitude().degrees || sec.getMinLongitude().degrees< originalSecror.mySector.getMinLongitude( ).degrees || sec.getMaxLongitude().degrees> originalSecror.mySector.getMaxLongitude( ).degrees || sec.getMaxLatitude().degrees> originalSecror.mySector.getMaxLatitude() .degrees) { equal = false; tile.getLevel().setFormatSuffix(".png"); urlx = new java.net.URL(thePath + ".png"); }else { tile.getLevel().setFormatSuffix(".jpg") urlx = new java.net.URL(thePath + ".jpg" +); } return urlx; } Last edited by ayman; 03-12-2008 at 06:54 AM. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DSTile Error: permission denied | arun.kumar | Image Serving & GIS | 6 | 11-17-2011 05:08 AM |
| More problems using dstile | Holywhippet | Image Serving & GIS | 15 | 04-24-2008 02:31 AM |
| Layer Zero for DsTile | glu29 | Technical Support | 0 | 12-07-2007 05:04 PM |
| Dstile win port | what_nick | WorldWind General | 87 | 09-15-2007 03:53 AM |
| DSTILE help | Efrain | Image Serving & GIS | 14 | 07-12-2007 04:46 PM |