# E:/DevIL/src-IL/src/il_jp2.c File Reference

`#include "il_internal.h"`
`#include <jasper/jasper.h>`
`#include "il_jp2.h"`

## Functions

ILboolean | iIsValidJp2 (void)
ILboolean | ilIsValidJp2 (ILconst_string FileName)
| Checks if the file specified in FileName is a valid .jp2 file.
ILboolean | ilIsValidJp2F (ILHANDLE File)
| Checks if the ILHANDLE contains a valid .jp2 file at the current position.
ILboolean | ilIsValidJp2L (const void *Lump, ILuint Size)
| Checks if Lump is a valid .jp2 lump.
ILboolean | ilLoadJp2 (ILconst_string FileName)
| Reads a Jpeg2000 file.
ILboolean | ilLoadJp2F (ILHANDLE File)
| Reads an already-opened Jpeg2000 file.
ILboolean | ilLoadJp2L (const void *Lump, ILuint Size)
| Reads from a memory "lump" that contains a Jpeg2000 stream.
ILboolean | ilLoadJp2LInternal (const void *Lump, ILuint Size, ILimage *Image)
| This is separated so that it can be called for other file types, such as .icns.
ILboolean | iLoadJp2Internal (jas_stream_t *Stream, ILimage *Image)
jas_stream_t * | iJp2ReadStream ()
jas_stream_t * | iJp2WriteStream ()
ILboolean | ilSaveJp2 (const ILstring FileName)
| Writes a Jp2 file.
ILuint | ilSaveJp2F (ILHANDLE File)
| Writes a Jp2 to an already-opened file.
ILuint | ilSaveJp2L (void *Lump, ILuint Size)
| Writes a Jp2 to a memory "lump".
ILint | Jp2ConvertData (jas_stream_t *in, jas_image_t *image)
ILboolean | iSaveJp2Internal ()

## Variables

ILboolean | JasperInit = IL_FALSE

## Function Documentation

ILboolean iIsValidJp2 | ( | void |  | ) |

Referenced by ilIsValidJp2F(), and ilIsValidJp2L().

jas_stream_t* iJp2ReadStream | ( |  | ) |

* If the buffer size specified is nonpositive, then the buffer

Referenced by ilLoadJp2F().

jas_stream_t* iJp2WriteStream | ( |  | ) |

Referenced by iSaveJp2Internal().

ILboolean ilIsValidJp2 | ( | ILconst_string | FileName | ) |

Checks if the file specified in FileName is a valid .jp2 file.

Referenced by ilIsValid().

ILboolean ilIsValidJp2F | ( | ILHANDLE | File | ) |

Checks if the ILHANDLE contains a valid .jp2 file at the current position.

Referenced by ilDetermineTypeF(), ilIsValidF(), and ilIsValidJp2().

ILboolean ilIsValidJp2L | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Checks if Lump is a valid .jp2 lump.

Referenced by ilDetermineTypeL(), and ilIsValidL().

ILboolean ilLoadJp2 | ( | ILconst_string | FileName | ) |

Reads a Jpeg2000 file.

Referenced by ilLoad(), and ilLoadImage().

ILboolean ilLoadJp2F | ( | ILHANDLE | File | ) |

Reads an already-opened Jpeg2000 file.

Referenced by ilLoadF(), and ilLoadJp2().

ILboolean ilLoadJp2L | ( | const void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Reads from a memory "lump" that contains a Jpeg2000 stream.

Referenced by ilLoadL().

ILboolean ilLoadJp2LInternal | ( | const void * | Lump,
|  | ILuint | Size,
|  | ILimage * | Image |
| ) |  |  |

This is separated so that it can be called for other file types, such as .icns.

Referenced by iIcnsReadData(), and ilLoadJp2L().

ILboolean iLoadJp2Internal | ( | jas_stream_t * | Stream,
|  | ILimage * | Image |
| ) |  |  |

Referenced by ilLoadJp2F(), and ilLoadJp2LInternal().

ILboolean ilSaveJp2 | ( | const ILstring | FileName | ) |

Writes a Jp2 file.

Referenced by ilSave(), and ilSaveImage().

ILuint ilSaveJp2F | ( | ILHANDLE | File | ) |

Writes a Jp2 to an already-opened file.

Referenced by ilSaveF(), and ilSaveJp2().

ILuint ilSaveJp2L | ( | void * | Lump,
|  | ILuint | Size |
| ) |  |  |

Writes a Jp2 to a memory "lump".

Referenced by ilDetermineSize(), and ilSaveL().

ILboolean iSaveJp2Internal | ( |  | ) |

Referenced by ilSaveJp2F(), and ilSaveJp2L().

ILint Jp2ConvertData | ( | jas_stream_t * | in,
|  | jas_image_t * | image |
| ) |  |  |

Referenced by iSaveJp2Internal().

## Variable Documentation

ILboolean JasperInit = IL_FALSE

Referenced by ilLoadJp2F(), ilLoadJp2LInternal(), and iSaveJp2Internal().