19862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org/* 29862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * Copyright (C)2011 D. R. Commander. All Rights Reserved. 3f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org * 49862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * Redistribution and use in source and binary forms, with or without 59862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * modification, are permitted provided that the following conditions are met: 6f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org * 79862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * - Redistributions of source code must retain the above copyright notice, 89862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * this list of conditions and the following disclaimer. 99862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * - Redistributions in binary form must reproduce the above copyright notice, 109862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * this list of conditions and the following disclaimer in the documentation 119862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * and/or other materials provided with the distribution. 129862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * - Neither the name of the libjpeg-turbo Project nor the names of its 139862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * contributors may be used to endorse or promote products derived from this 149862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * software without specific prior written permission. 159862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * 169862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", 179862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 189862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 199862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 209862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 219862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 229862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 239862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 249862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 259862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 269862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org * POSSIBILITY OF SUCH DAMAGE. 279862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org */ 28f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 29f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org#ifndef __BMP_H__ 30f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org#define __BMP_H__ 31f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 329862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org#include "./turbojpeg.h" 33f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 349862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.orgint loadbmp(char *filename, unsigned char **buf, int *w, int *h, int pf, 359862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org int bottomup); 36f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 379862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.orgint savebmp(char *filename, unsigned char *buf, int w, int h, int pf, 389862697206250265c6bb37a4186b0a411c78de3bhbono@chromium.org int bottomup); 39f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 40f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.orgconst char *bmpgeterr(void); 41f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org 42f0c4f33a4aa0760ba0e12a254b69d996442c9c5hbono@chromium.org#endif 43