2 * CasparCG is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * CasparCG is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
15 * Author: Niklas P Andersson, niklas.p.andersson@svt.se
24 namespace caspar { namespace psd {
30 image(int width, int height, int channels) : width_(width), height_(height), channels_(channels)
32 data_.resize(width*height*channels);
35 int width() const { return width_; }
36 int height() const { return height_; }
37 int channel_count() const { return channels_; }
39 T* data() { return data_.data(); }
48 typedef image<std::uint8_t> image8bit;
49 typedef image<std::uint16_t> image16bit;
50 typedef image<std::uint32_t> image32bit;
52 typedef std::shared_ptr<image8bit> image8bit_ptr;
53 typedef std::shared_ptr<image16bit> image16bit_ptr;
54 typedef std::shared_ptr<image32bit> image32bit_ptr;