Subscribe to this thread
Home - General / All posts - Exporting Image in .ECW format has 3 instead of 4 channels
julmou29 post(s)
#11-Jul-23 02:28

Hi,

So, I have a massive file for imagery in an ECW format. Manifold manages to import it just fine, and the resulting image has four channels (one for opacity, which is important).

I have reprojected the Image with a lower pixel resolution, so that it still maintains good quality but drastically reduces the size of the Image, which makes it more practical for us to work with. This new reprojected image still has all four channels correctly.

The issue though, is that, when I export this new image in ECW format, it loses the fourth channel (Channel 3). Indeed once the export is done, and I import the file, it shows in the properties that it has only 3 channels (uint8x3, instead of uint8x4), and it's pretty obvious anyway when I use the image, it's all white in the places where it should be transparent.

Is this an issue that was already known?

We should be able to export in ECW format while still retaining four channels, shouldn't we?

I am using Manifold Base 9.0.180.0

Edit: I tried exporting in JPEG2000 (.jp2) format, and the same thing happens, I lose the 4th channel with the opacity.

When exporting in TIFF format, it retains all four channels. However, the compression rate of the TIFF is not satisfactory for us, the file is too big.

dale

647 post(s)
online
#11-Jul-23 03:43

The very fine manual answers your question.

M9 exports Version 2 ECWs. To quote the manual, that format has have some minor limitations, for example, not being able to store alpha transparency.

julmou29 post(s)
#11-Jul-23 07:49

Hmm, I understand.

The original ECW file that I import does have the alpha transparency though, which means it was probably created with ECW version 3.

Is there any plan for a future version of Manifold to be able to export in ECW v3?

For context, the original ECW file we are working with is 4.2GB in size (LIDAR remote sensing). But when importing this file into Manifold, it grows into 75.9GB in size! We can't reasonably save any .map workspace containing the imported Image, for storage purposes.

I tried exporting the Image into different formats, and really only ECW or JPEG2000 (JP2) managed to drastically reduce the Image into a reasonable size. These are powerful formats which shouldn't be discarded.

Dimitri


7,557 post(s)
#11-Jul-23 09:07

These are powerful formats which shouldn't be discarded.

I agree they are powerful formats, but they have pluses and minuses, for example, trashing the actual data when lossy compression is used to drastically reduce the size of the image. That's OK for many viewing purposes but it's not OK for analytics. So it's not so much that anybody is discarding the formats as it is that there are alternatives that are also used, and which work better for some purposes than ECW.

Keep in mind that if you want to do analytics there is no free lunch: you need the actual, real data at each pixel location and that means decompressing into real pixels. If the real image is 75 GB in size, that's the size it will take.

Working with real images that are 75 GB in size is no big deal in 9. The first time you import and save as a .map project it may take a while, but after that it's instantaneous to open and to view. Disk are cheap: you can buy a 2TB Samsung SATA SSD for only $90 on Newegg, with 4TB going for around $200 and 8TB for under $400. Get the 8TB SSD and you'll have room for plenty of 75 GB images. If you don't need SSD the prices are even lower: buy a 20 TB Seagate drive on Newegg for only $309.

If you don't need to work with real data but are just viewing, you can use formats like GeoTIFF which will provide good compression with good viewing results. And whether you are only viewing or need the real data for analytics, you can save your big images in a .map file and then just link them in read-only to multiple various projects, either linking .map files directly or using Manifold Server.

That's what I do with the big images that I use. An example also is the 17 GB terrain background image in the http server example at https://manifold.net/ims9/ - it's just as fast linked in as if it was stored in that .map project.

Be that as it may, if you judge the various tradeoffs involved are OK for your work and you want to use ECW version 3 you can do that today: you just have to pay Hexagon to use it. Hexagon sells a compressor tool that lets you do it.

If Manifold licensed v3 ECW from Hexagon that would require Manifold charging you a fee for that capability, passing on the license cost from Hexagon. It doesn't make sense for Manifold to be a middleman for Hexagon licenses since Manifold would have to charge you more than a direct buy from Hexagon.

Another option if you can accept lossy compression to get greatly reduced storage sizes would be to convert ECW v3 images into JPEG2000 images using the open source JP2OpenJPEG driver in GDAL, using a GDAL command line to do the conversion. That's free.

ponsrud11 post(s)
#10-Apr-24 13:02

Hi there, I am just wondering if there are still no plan for Manifold to export in ECW V3?

I have converted irregular sized TIF files to ECW to save space, but since the result files have white background it is sort of uselss for us.

Dimitri


7,557 post(s)
#10-Apr-24 20:34

Have you looked into the licensing fees for ECW V3? If you really want V3 I suppose you could buy it and then use it. That would be cheaper than Manifold buying it for you and then charging you the cost of V3, plus some extra amount.

ponsrud11 post(s)
#11-Apr-24 08:42

Nope , I shall check it out :)

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.