jpeg2000

Convert byte array (byte[]) to Image in Java

本小妞迷上赌 提交于 2019-11-29 11:04:12
I have a byte[] that I want to convert to an Image and display the image in a label. The byte[] is of a jpeg 2000 format. I have tried the code below but it returns null: InputStream in = new ByteArrayInputStream(bytearray); BufferedImage image = ImageIO.read(in); The image value comes back as null . I want to be able to display the image in a label like below: jLabel.setIcon(new ImageIcon(image)); Thanks To convert an array of bytes, i.e. byte[] into an Image , use getImage() . Probably the easiest way to do this is to instantiate an ImageIcon using the ImageIcon(byte[]) constructor, and then

jpeg2000 on ios app

一曲冷凌霜 提交于 2019-11-29 02:42:38
Has anyone had luck converting and using jpeg2000 on the ios? I am writing and inventory app and would love to go with a jpeg2000 file type if I can figure out how to get the phone to support it. I have seen that there is a nice project for webp - https://github.com/carsonmcdonald/WebP-iOS-example - which seems like it would also work but I think the jpeg2000 results are even better. Just trying to eval options. Thx in advance We used JPEG 2000 for my last project (Spot.app) I downloaded the official open-source JPEG 2000 codec source from here: http://www.openjpeg.org/index.php?menu=download

read jpeg2000 files in java

两盒软妹~` 提交于 2019-11-28 12:14:04
I have a code using a byte[] that contains a image jpeg2000 bytes. I want show this in jLabel component howto do this? Anyone have idea or code to do? You would do it in this way Image img = ImageIO.read(new ByteArrayInputStream(imageBytes)); ImageIcon imgIcon = new ImageIcon(img); JLabel label = new JLabel(imgIcon); but the JPG2000 decoder isn't supplied with standard SDK, you should head here (Java Advanced Imaging) and use the right decoder for that format.. Apparently the support of jpeg2000 / ( .jp2 ) files has been removed from Java Advanced Imaging (JAI). By un-installing JAI 1.1.3 and

jpeg2000 on ios app

大憨熊 提交于 2019-11-27 17:00:16
问题 Has anyone had luck converting and using jpeg2000 on the ios? I am writing and inventory app and would love to go with a jpeg2000 file type if I can figure out how to get the phone to support it. I have seen that there is a nice project for webp - https://github.com/carsonmcdonald/WebP-iOS-example - which seems like it would also work but I think the jpeg2000 results are even better. Just trying to eval options. Thx in advance 回答1: We used JPEG 2000 for my last project (Spot.app) I downloaded

JPEG 2000 support in C#.NET

*爱你&永不变心* 提交于 2019-11-27 04:31:07
It seems that .NET can't open JP2 (Jpeg 2000) files using the GDI library. I've searched on google but can't find any libraries or example code to do this. Anybody got any ideas? I don't really want to pay for a library to do it unless I have to.. Seems like we can do it using FreeImage (which is free) FIBITMAP dib = FreeImage.LoadEx("test.jp2"); //save the image out to disk FreeImage.Save(FREE_IMAGE_FORMAT.FIF_JPEG, dib, "test.jpg", FREE_IMAGE_SAVE_FLAGS.JPEG_QUALITYNORMAL); //or even turn it into a normal Bitmap for later use Bitmap bitmap = FreeImage.GetBitmap(dib); Rowland Shaw I was

JPEG 2000 support in C#.NET

£可爱£侵袭症+ 提交于 2019-11-26 12:44:47
问题 It seems that .NET can\'t open JP2 (Jpeg 2000) files using the GDI library. I\'ve searched on google but can\'t find any libraries or example code to do this. Anybody got any ideas? I don\'t really want to pay for a library to do it unless I have to.. 回答1: Seems like we can do it using FreeImage (which is free) FIBITMAP dib = FreeImage.LoadEx("test.jp2"); //save the image out to disk FreeImage.Save(FREE_IMAGE_FORMAT.FIF_JPEG, dib, "test.jpg", FREE_IMAGE_SAVE_FLAGS.JPEG_QUALITYNORMAL); //or