Hello all,
I would need some assistance in making this happen. I have some png32 tiles with dimensions ~270 KiB and I managed to reduce the size and keep the quality like this:
convert my_file.png -define jp2:rate=0.3 -define compression=JPEG2000 my_file.jp2
It all worked well until I saw that it does not keep the transparency. I tried several options but I am probably mussing something obvious. Can you please point me in the right direction.
If you also have another image format that can keep a good quality wile having a small size and support transparency, please let me know to try it out.
Thanks a ton!
Convert PNG32 to Jpeg2000,reduce size and keep transparency?
-
- Posts: 11
- Joined: 2014-02-04T01:40:44-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
Using IM v6.8.8-0 on Windows 8.1, jp2 retains transparency. For example:
What IM version are you using?
Code: Select all
convert -size 300x200 -background none label:snibgo s.jp2
snibgo's IM pages: im.snibgo.com
-
- Posts: 11
- Joined: 2014-02-04T01:40:44-07:00
- Authentication code: 6789
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
Hello,
I am using imagemagick-6.8.5.4 on Unix; if I use your example I just have a black box.
Do you have the jasper delegate library installed?
Check your delegates via
convert -version
does it list jp2 or jp2000
I am using imagemagick-6.8.5.4 on Unix; if I use your example I just have a black box.
Do you have the jasper delegate library installed?
Check your delegates via
convert -version
does it list jp2 or jp2000
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
Something about your build process is probably different to mine. I just use the Windows pre-built binaries. I suggest you look at other threads on JP2.
snibgo's IM pages: im.snibgo.com
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
can you post a sample image?
Is size reduction with transparency intact your only goal? Could we reduce the color depth, or strip metadata to save size? What is your target size?
Does Jpeg2000 support transparency? Normal jpg does not?
Is size reduction with transparency intact your only goal? Could we reduce the color depth, or strip metadata to save size? What is your target size?
Does Jpeg2000 support transparency? Normal jpg does not?
-
- Posts: 11
- Joined: 2014-02-04T01:40:44-07:00
- Authentication code: 6789
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
Hello,
Yes, jp2000 supports transparency.
I managed to fix it by running the same command as in the first post, but on version 6.7.8-8 2013-03-18 Q16 (on a virtual machine)
For this version, when I run convert -version I have listed only these (no delegates)
"6.7.8-8 2013-03-18 Q16"
"Features: OpenMP"
The other version from the first example uses 6.8.5.4 and has many more listed, including delegates: jp2
Yes, jp2000 supports transparency.
I managed to fix it by running the same command as in the first post, but on version 6.7.8-8 2013-03-18 Q16 (on a virtual machine)
For this version, when I run convert -version I have listed only these (no delegates)
"6.7.8-8 2013-03-18 Q16"
"Features: OpenMP"
The other version from the first example uses 6.8.5.4 and has many more listed, including delegates: jp2
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
I don't think new versions list delegates when you run -version.
Try convert -list Format.
Glad you got it fixed
Try convert -list Format.
Glad you got it fixed
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert PNG32 to Jpeg2000,reduce size and keep transpare
The older versions of IM did not list delegates and one would have to do convert -list configure to get them. But the newer versions of IM do list delegates as for example on my systemmrmattnc wrote:I don't think new versions list delegates when you run -version.
convert -version
Version: ImageMagick 6.8.8-4 Q16 x86_64 2014-01-29 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib cairo fftw fontconfig freetype gslib jbig jng jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib