Image-Epeg

 view release on metacpan or  search on metacpan

Epeg.xs  view on Meta::CPAN

		RETVAL = (Epeg_Image *)epeg_memory_open( data, dataLen );
	OUTPUT:
		RETVAL


void
_epeg_size_get( img )
	Epeg_Image * img;
	PREINIT:
		int h, w;
	PPCODE:
		epeg_size_get( img, &w, &h );
		XPUSHs( sv_2mortal( newSViv( w ) ) );
		XPUSHs( sv_2mortal( newSViv( h ) ) );


void
_epeg_output_size_get( img )
	Epeg_Image * img;
	PREINIT:
		int h, w;
	PPCODE:
		epeg_output_size_get( img, &w, &h );
		XPUSHs( sv_2mortal( newSViv( w ) ) );
		XPUSHs( sv_2mortal( newSViv( h ) ) );


void
_epeg_decode_size_set( img, w, h )
	Epeg_Image * img;
	int w;
	int h;

Epeg.xs  view on Meta::CPAN

		epeg_quality_set( img, quality );


void
_epeg_get_data( img )
	Epeg_Image * img;
	PREINIT:
		unsigned char * pOut = NULL;
		int outSize = 0;
		int rc;
	PPCODE:
		epeg_memory_output_set( img, &pOut, &outSize );
		rc = epeg_encode( img );
		if( !rc )
		{
			PUSHs(sv_2mortal(newSVpv( (char*)pOut, outSize )));
			orig_free(pOut);
		}
		else
		{
			PUSHs(sv_2mortal(&PL_sv_undef));
		}


void
_epeg_write_file( img, filename )
	Epeg_Image * img;
	const char * filename;
	PREINIT:
		int rc;
	PPCODE:
		epeg_file_output_set( img, filename );
		rc = epeg_encode( img );
		PUSHs(sv_2mortal( (rc ? &PL_sv_undef : newSViv(1)) ));


void
_epeg_close( img )
	Epeg_Image * img;
	CODE:
		epeg_close( img );



( run in 0.653 second using v1.01-cache-2.11-cpan-71847e10f99 )