#include "main.h"
#include "support.h"
LT_USE_NAMESPACE(LizardTech);
{
TEST_BOOL(reader != nullptr);
TEST_SUCCESS(reader->
initialize(INPUT_PATH(
"meg.bip"), inputProps, 640, 480));
TEST_BOOL(colorFilter != nullptr);
TEST_SUCCESS(colorFilter->
initialize(reader, grayPixel));
TEST_BOOL(cropFilter != nullptr);
TEST_SUCCESS(cropFilter->
initialize(colorFilter, 20, 20, 600, 440));
TEST_BOOL(cropFilter->
getWidth() == 600);
const LTIScene scene(0, 0, 600, 440, 1.0);
TEST_SUCCESS(writer.
write(scene));
TEST_BOOL(Compare(OUTPUT_PATH("meg_filter.raw"), INPUT_PATH("meg_filter.raw")));
Remove(OUTPUT_PATH("meg_filter.raw"));
cropFilter->release();
cropFilter = nullptr;
colorFilter = nullptr;
reader->release();
reader = nullptr;
}
lt_uint32 LT_STATUS
An integral status code.
#define LT_STS_Uninit
status code indicating unintialized variable
#define LT_STS_Success
status code indicating success
@ LTI_COLORSPACE_GRAYSCALE
change the colorspace of the image
LT_STATUS initialize(LTIImageStage *srcImage, const LTIPixel &dstPixel)
initializer
static LTIColorTransformer * create(void)
crops the image stage to a smaller width and height
LT_STATUS initialize(LTIImageStage *srcImage, lt_int32 xOffset, lt_int32 yOffset, lt_int32 newWidth, lt_int32 newHeight)
initializer
static LTICropFilter * create(void)
virtual LT_STATUS setOutputFileSpec(const LTFileSpec &fileSpec)
set output file name
LTIColorSpace getColorSpace() const
get colorspace
lt_uint32 getWidth() const
lt_uint32 getHeight() const
virtual LT_STATUS write(const LTIScene &scene)
write (encode) a scene to the output format
basic properties of a pixel
class for reading RAW files
static LTIRawImageReader * create(void)
LT_STATUS initialize(LTIOStreamInf *stream, const LTIPixel &pixelProps, lt_uint32 width, lt_uint32 height, bool useWorldFile=true)
initialize (stream)
class for writing RAW files
LT_STATUS initialize(LTIImageStage *imageStage)
initialization function
virtual void release(void) const
decrement the reference counter and delete the object when the counter is zero
representation of a scene