I speak more latin than I do speak C. But that's my best guess:

Code:
--------------------
    diff --git a/src/resize.c b/src/resize.c
  index 9bf6f34..41f7605 100644
  --- a/src/resize.c
  +++ b/src/resize.c
  @@ -71,7 +71,11 @@ void copyResampled (SDL_Surface *dst, SDL_Surface *src,
  int x, y;
  double sy1, sy2, sx1, sx2;
  
  -       if (src->format->BytesPerPixel != 4 || dst->format->BytesPerPixel != 
4) {
  +       int bpp;
  +       bpp = src->format->BytesPerPixel;
  +       
  +       if ( (bpp != 4 && bpp != 2) || dst->format->BytesPerPixel != 4) {
  +               LOG_ERROR(log_ui, "Unsupported BytesPerPixel: src:%d dst:%d", 
src->format->BytesPerPixel, dst->format->BytesPerPixel);
  return;
  }
  
  @@ -118,7 +122,11 @@ void copyResampled (SDL_Surface *dst, SDL_Surface *src,
  }
  pcontribution = xportion * yportion;
  
  -                                       Uint32 pixel = *((Uint32 
*)src->pixels + ((int) sy + srcY) * src->pitch / 4 + ((int) sx + srcX));
  +                                       Uint32 pixel = bpp == 2
  +                                               ? *((Uint16 *)src->pixels + 
((int) sy + srcY) * src->pitch / bpp + ((int) sx + srcX))
  +                                               : *((Uint32 *)src->pixels + 
((int) sy + srcY) * src->pitch / bpp + ((int) sx + srcX));
  Uint8 R, G, B, A;
  SDL_GetRGBA(pixel, src->format, &R, &G, &B, &A);
  
--------------------


I have no idea how sane this is, but it makes those images show up at
last :-).



Michael

http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR,
Smart Mix
------------------------------------------------------------------------
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=98156

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to