Good day,
I have a very large jp2 file that I want to read sections of and create my own tiles. Is this possible?
-Markus
jp2, ability to read regions
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: jp2, ability to read regions
A bit more detail would be more helpful. But in the meantime, it would seem that you can do that with -crop in the command line. There should be a Magick.Net equivalent, but I do not use Magick.Net.
See https://www.imagemagick.org/Usage/crop/#crop
See https://www.imagemagick.org/Usage/crop/#crop
Re: jp2, ability to read regions
Thanks for your comment.
I have a 200MB jp2 file (2.3GB png). I am needing to convert it to a deepzoom/tile format, 256x256 sized tiles. To do this I need to be able to read "chunks" of the file and save to jpg.
I will checkout crop in the meantime.
-Markus
I have a 200MB jp2 file (2.3GB png). I am needing to convert it to a deepzoom/tile format, 256x256 sized tiles. To do this I need to be able to read "chunks" of the file and save to jpg.
I will checkout crop in the meantime.
-Markus
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: jp2, ability to read regions
The [] suffix seem to work with JP2, and this might prevent the entire image being read into memory, eg:
So, in your code where you have the input filename, suffix it with "[256x256+512+512]" or whatever.
Code: Select all
convert in.jp2[256x256+512+512] out.png
snibgo's IM pages: im.snibgo.com
Re: jp2, ability to read regions
Thanks Snibgo,
I will look for a Magick.Net equivalent.
For giggles I will run this this in a loop on the entire image to see how it takes.
-Markus
I will look for a Magick.Net equivalent.
For giggles I will run this this in a loop on the entire image to see how it takes.
-Markus
Re: jp2, ability to read regions
image.Read("in.jp2[256x256+512+512]") can be used to read regions.