fixed minor bug in png loader.... added copying file :)
SVN revision: 28
This commit is contained in:
parent
520edea668
commit
ee1adf47a4
|
@ -0,0 +1,18 @@
|
|||
Copyright (C) 1999 Carsten Haitzler and various contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
loader_png.c
18
loader_png.c
|
@ -150,13 +150,19 @@ save (ImlibImage *im)
|
|||
void
|
||||
formats (ImlibLoader *l)
|
||||
{
|
||||
/* this is the only bit you have to change... */
|
||||
char *list_formats[] =
|
||||
{ "png" };
|
||||
int num_formats = 1;
|
||||
int i;
|
||||
|
||||
l->formats = malloc(sizeof(char *) * num_formats);
|
||||
for (i = 0; i < num_formats; i++)
|
||||
l->formats[i] = strdup(list_formats[i]);
|
||||
|
||||
/* don't bother changing any of this - it just reads this in and sets */
|
||||
/* the struct values and makes copies */
|
||||
{
|
||||
int i;
|
||||
|
||||
l->num_formats = (sizeof(list_formats) / sizeof (char *));
|
||||
l->formats = malloc(sizeof(char *) * l->num_formats);
|
||||
for (i = 0; i < l->num_formats; i++)
|
||||
l->formats[i] = strdup(list_formats[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue