diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 13:22:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 13:22:47 +0100 |
| commit | 27fac0b4c6d42cb3b47bc1240d50ce11923fb66a (patch) | |
| tree | c59025745f30ef51157304c77f82ac56112ca316 /src/lib/image.cc | |
| parent | 429e42c019889e90c9e376170b08614654231337 (diff) | |
Simplify use of Image hierarchy a bit.
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index 98c5228a9..602b20842 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -88,7 +88,7 @@ Image::scale (Size out_size, Scaler const * scaler) const { assert (scaler); - shared_ptr<SimpleImage> scaled (new SimpleImage (pixel_format(), out_size)); + shared_ptr<Image> scaled (new SimpleImage (pixel_format(), out_size)); struct SwsContext* scale_context = sws_getContext ( size().width, size().height, pixel_format(), @@ -112,7 +112,7 @@ Image::scale (Size out_size, Scaler const * scaler) const * @param out_size Output image size in pixels. * @param scaler Scaler to use. */ -shared_ptr<RGBFrameImage> +shared_ptr<Image> Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scaler) const { assert (scaler); @@ -120,7 +120,7 @@ Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scal Size content_size = out_size; content_size.width -= (padding * 2); - shared_ptr<RGBFrameImage> rgb (new RGBFrameImage (content_size)); + shared_ptr<Image> rgb (new SimpleImage (PIX_FMT_RGB24, content_size)); struct SwsContext* scale_context = sws_getContext ( size().width, size().height, pixel_format(), @@ -141,7 +141,7 @@ Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scal scheme of things. */ if (padding > 0) { - shared_ptr<RGBFrameImage> padded_rgb (new RGBFrameImage (out_size)); + shared_ptr<Image> padded_rgb (new SimpleImage (PIX_FMT_RGB24, out_size)); padded_rgb->make_black (); /* XXX: we are cheating a bit here; we know the frame is RGB so we can @@ -167,10 +167,10 @@ Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scal * @param pp Flags for the required set of post processes. * @return Post-processed image. */ -shared_ptr<SimpleImage> +shared_ptr<Image> Image::post_process (string pp) const { - shared_ptr<SimpleImage> out (new SimpleImage (PIX_FMT_YUV420P, size ())); + shared_ptr<Image> out (new SimpleImage (PIX_FMT_YUV420P, size ())); pp_mode* mode = pp_get_mode_by_name_and_quality (pp.c_str (), PP_QUALITY_MAX); pp_context* context = pp_get_context (size().width, size().height, PP_FORMAT_420 | PP_CPU_CAPS_MMX2); |
