mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
For PSB images certain resources have 64-bit lengths. Let's handle this transparently by adding a psd_version parameter and depending on that and the type of resource we decide if the length to read is 32 or 64-bit. We also return the total header size. This way the calling function can use that to determine the remaining length. Because we needed to check the signature when loading the header we remove that check from the load_layer_resource function since that would be redundant.
37 lines
1.3 KiB
C
37 lines
1.3 KiB
C
/* GIMP - The GNU Image Manipulation Program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* GIMP PSD Plug-in
|
|
* Copyright 2007 by John Marshall
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __PSD_LAYER_RES_LOAD_H__
|
|
#define __PSD_LAYER_RES_LOAD_H__
|
|
|
|
|
|
gint get_layer_resource_header (PSDlayerres *res_a,
|
|
guint16 psd_version,
|
|
GInputStream *input,
|
|
GError **error);
|
|
|
|
gint load_layer_resource (PSDlayerres *res_a,
|
|
PSDlayer *lyr_a,
|
|
GInputStream *input,
|
|
GError **error);
|
|
|
|
|
|
#endif /* __PSD_LAYER_RES_LOAD_H__ */
|