Просмотр исходного кода

libpipi: fix file headers.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2903 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 лет назад
Родитель
Сommit
3bf0d166a8
2 измененных файлов: 12 добавлений и 12 удалений
  1. +1
    -1
      pipi/codec/coreimage.h
  2. +11
    -11
      pipi/codec/coreimage.m

+ 1
- 1
pipi/codec/coreimage.h Просмотреть файл

@@ -1,5 +1,5 @@
/*
* libpipi Proper image processing implementation library
* libpipi Pathetic image processing interface library
* Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org>
* 2008 Jean-Yves Lamoureux <jylam@lnxscene.org>
* All Rights Reserved


+ 11
- 11
pipi/codec/coreimage.m Просмотреть файл

@@ -1,5 +1,5 @@
/*
* libpipi Proper image processing implementation library
* libpipi Pathetic image processing interface library
* Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org>
* 2008 Jean-Yves Lamoureux <jylam@lnxscene.org>
* All Rights Reserved
@@ -37,7 +37,7 @@ pipi_image_t *pipi_load_coreimage(const char *name)

NSBitmapImageRep * myImage;
myImage = [[NSBitmapImageRep alloc] initWithCIImage:source];
pipi_image_t *img;
img = pipi_new(w, h);
img->p[PIPI_PIXELS_RGBA_C].pixels = [myImage bitmapData];
@@ -49,11 +49,11 @@ pipi_image_t *pipi_load_coreimage(const char *name)
img->last_modified = PIPI_PIXELS_RGBA_C;

img->codec_priv = (void*)[myImage bitmapFormat];
pipi_pixels_t *p = pipi_getpixels(img, PIPI_PIXELS_RGBA_C);
[autoreleasepool release];
[autoreleasepool release];
return img;
}

@@ -63,7 +63,7 @@ int pipi_save_coreimage(pipi_image_t *img, const char *name)
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
printf("%d\n", img->last_modified);
pipi_pixels_t *p = pipi_getpixels(img, PIPI_PIXELS_RGBA_C);
NSString *n = [NSString stringWithCString: name];
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
@@ -80,12 +80,12 @@ int pipi_save_coreimage(pipi_image_t *img, const char *name)
];
if(bitmap == nil) return -1;
memcpy([bitmap bitmapData], p->pixels, p->w*p->h*4);
[[bitmap representationUsingType:NSPNGFileType properties:nil] writeToFile:n atomically:YES];
[autoreleasepool release];
[[bitmap representationUsingType:NSPNGFileType properties:nil] writeToFile:n atomically:YES];
[autoreleasepool release];

return 1;
}


#endif
#endif

Загрузка…
Отмена
Сохранить