[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/libbase image.cpp image.h jpeg.h
From: |
strk |
Subject: |
[Gnash-commit] gnash/libbase image.cpp image.h jpeg.h |
Date: |
Fri, 03 Feb 2006 21:31:32 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: strk <address@hidden> 06/02/03 21:31:32
Modified files:
libbase : image.cpp image.h jpeg.h
Log message:
Doxygen-enabled dox
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image.cpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/image.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/libbase/jpeg.h.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnash/libbase/image.cpp
diff -u gnash/libbase/image.cpp:1.1 gnash/libbase/image.cpp:1.2
--- gnash/libbase/image.cpp:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/image.cpp Fri Feb 3 21:31:32 2006
@@ -1,4 +1,4 @@
-// image.h -- Thatcher Ulrich <address@hidden> 2002
+// image.cpp -- Thatcher Ulrich <address@hidden> 2002
// This source code has been donated to the Public Domain. Do
// whatever you want with it.
Index: gnash/libbase/image.h
diff -u gnash/libbase/image.h:1.1 gnash/libbase/image.h:1.2
--- gnash/libbase/image.h:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/image.h Fri Feb 3 21:31:32 2006
@@ -15,8 +15,10 @@
namespace jpeg { struct input; };
+/// Handy image utilities for RGB surfaces.
namespace image
{
+ /// Base class for different types of images
struct image_base
{
Uint8* m_data;
@@ -27,14 +29,14 @@
image_base(Uint8* data, int width, int height, int pitch);
};
- // 24-bit RGB image. Packed data, red byte first (RGBRGB...)
+ /// 24-bit RGB image. Packed data, red byte first (RGBRGB...)
struct rgb : public image_base
{
rgb(int width, int height);
~rgb();
};
- // 32-bit RGBA image. Packed data, red byte first (RGBARGBA...)
+ /// 32-bit RGBA image. Packed data, red byte first (RGBARGBA...)
struct rgba : public image_base
{
rgba(int width, int height);
@@ -43,7 +45,7 @@
void set_pixel(int x, int y, Uint8 r, Uint8 g, Uint8 b,
Uint8 a);
};
- // 8-bit alpha image.
+ /// 8-bit alpha image.
struct alpha : public image_base
{
alpha(int width, int height);
@@ -59,17 +61,18 @@
};
- // Make a system-memory 24-bit bitmap surface. 24-bit packed
- // data, red byte first.
+ /// Make a system-memory 24-bit bitmap surface. 24-bit packed
+ /// data, red byte first.
rgb* create_rgb(int width, int height);
- // Make a system-memory 32-bit bitmap surface. Packed data,
- // red byte first.
+ /// \brief
+ /// Make a system-memory 32-bit bitmap surface. Packed data,
+ /// red byte first.
rgba* create_rgba(int width, int height);
- // Make a system-memory 8-bit bitmap surface.
+ /// Make a system-memory 8-bit bitmap surface.
alpha* create_alpha(int width, int height);
@@ -83,27 +86,41 @@
void resample(rgba* out, int out_x0, int out_y0, int out_x1, int
out_y1,
rgba* in, float in_x0, float in_y0, float in_x1, float
in_y1);
+ /// Write the given image to the given out stream, in jpeg format.
void write_jpeg(tu_file* out, rgb* image, int quality);
+
+ /// Write a 32-bit Targa format bitmap. Dead simple, no compression.
void write_tga(tu_file* out, rgba* image);
+ /// Create and read a new image from the given filename, if possible.
rgb* read_jpeg(const char* filename);
+
+ /// Create and read a new image from the stream.
rgb* read_jpeg(tu_file* in);
- // For reading SWF JPEG2-style image data (slight variation on
- // ordinary JPEG).
+ /// \brief
+ /// For reading SWF JPEG2-style image data (slight variation on
+ /// ordinary JPEG).
rgb* read_swf_jpeg2(tu_file* in);
- // For reading SWF JPEG2-style image data, using pre-loaded
- // headers stored in the given jpeg::input object.
+ /// \brief
+ /// For reading SWF JPEG2-style image data, using pre-loaded
+ /// headers stored in the given jpeg::input object.
rgb* read_swf_jpeg2_with_tables(jpeg::input* loader);
- // For reading SWF JPEG3-style image data, like ordinary JPEG,
- // but stores the data in rgba format.
+ /// \brief
+ /// For reading SWF JPEG3-style image data, like ordinary JPEG,
+ /// but stores the data in rgba format.
rgba* read_swf_jpeg3(tu_file* in);
- // Fast, in-place, DESTRUCTIVE resample. For making mip-maps.
- // Munges the input image to produce the output image.
+ /// \brief
+ /// Fast, in-place, DESTRUCTIVE resample. For making mip-maps.
+ /// Munges the input image to produce the output image.
void make_next_miplevel(rgb* image);
+
+ /// \brief
+ /// Fast, in-place resample. For making mip-maps. Munges the
+ /// input image to produce the output image.
void make_next_miplevel(rgba* image);
};
Index: gnash/libbase/jpeg.h
diff -u gnash/libbase/jpeg.h:1.1 gnash/libbase/jpeg.h:1.2
--- gnash/libbase/jpeg.h:1.1 Tue Dec 20 20:57:00 2005
+++ gnash/libbase/jpeg.h Fri Feb 3 21:31:32 2006
@@ -17,11 +17,17 @@
class tu_file;
+/// Wrapper for jpeg file operations.
+//
+/// The actual work is done by the
+/// IJG jpeg lib.
+///
namespace jpeg
{
- // wrapper around jpeg_decompress_struct.
+ /// Wrapper around jpeg_decompress_struct.
struct input {
- // Read header and create a jpeg input object.
+
+ /// Read header and create a jpeg input object.
static input* create(tu_file* in);
// // Read SWF JPEG2-style header (separate encoding
@@ -29,10 +35,20 @@
// // input object.
// static input* create_swf_jpeg2(SDL_RWops* in);
+
+ /// Read SWF JPEG2-style header.
+ //
+ /// App needs to call start_image() before loading any
+ /// image data. Multiple images can be loaded by
+ /// bracketing within start_image()/finish_image() pairs.
+ ///
static input* create_swf_jpeg2_header_only(tu_file* in);
+
virtual ~input();
+ /// Discard existing bytes in our buffer.
virtual void discard_partial_buffer() = 0;
+
virtual void start_image() = 0;
virtual void finish_image() = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/libbase image.cpp image.h jpeg.h,
strk <=