/* $Id$ * $URL$ * * image widget handling * * Copyright (C) 2006 Michael Reinelt * Copyright (C) 2006 The LCD4Linux Team * * 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 2, 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, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * exported functions: * * WIDGET_CLASS Widget_Image * the image widget * */ #include "config.h" #include #include #include #include #include #ifdef HAVE_GD_GD_H #include #else #ifdef HAVE_GD_H #include #else #error "gd.h not found!" #error "cannot compile image widget" #endif #endif #if GD2_VERS != 2 #error "lcd4linux requires libgd version 2" #error "cannot compile image widget" #endif #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "property.h" #include "timer.h" #include "widget.h" #include "widget_image.h" #include "rgb.h" #ifdef WITH_DMALLOC #include #endif static void widget_image_render(const char *Name, WIDGET_IMAGE * Image) { int x, y; int inverted; gdImagePtr gdImage; /* clear bitmap */ if (Image->bitmap) { int i; for (i = 0; i < Image->height * Image->width; i++) { RGBA empty = {.R = 0x00,.G = 0x00,.B = 0x00,.A = 0x00 }; Image->bitmap[i] = empty; } } /* reload image only on first call or on explicit reload request */ if (Image->gdImage == NULL || P2N(&Image->reload)) { char *file; FILE *fd; /* free previous image */ if (Image->gdImage) { gdImageDestroy(Image->gdImage); Image->gdImage = NULL; } file = P2S(&Image->file); if (file == NULL || file[0] == '\0') { error("Warning: Image %s has no file", Name); return; } fd = fopen(file, "rb"); if (fd == NULL) { error("Warning: Image %s: fopen(%s) failed: %s", Name, file, strerror(errno)); return; } Image->gdImage = gdImageCreateFromPng(fd); fclose(fd); if (Image->gdImage == NULL) { error("Warning: Image %s: CreateFromPng(%s) failed!", Name, file); return; } } /* maybe resize bitmap */ gdImage = Image->gdImage; if (gdImage->sx > Image->width) { Image->width = gdImage->sx; free(Image->bitmap); Image->bitmap = NULL; } if (gdImage->sy > Image->height) { Image->height = gdImage->sy; free(Image->bitmap); Image->bitmap = NULL; } if (Image->bitmap == NULL && Image->width > 0 && Image->height > 0) { int i = Image->width * Image->height * sizeof(Image->bitmap[0]); Image->bitmap = malloc(i); if (Image->bitmap == NULL) { error("Warning: Image %s: malloc(%d) failed: %s", Name, i, strerror(errno)); return; } for (i = 0; i < Image->height * Image->width; i++) { RGBA empty = {.R = 0x00,.G = 0x00,.B = 0x00,.A = 0
# Intelsat Americas 5 @ 97W
# freq pol sr fec

S 11789000 V 25000000 AUTO
S 11836000 V 20765000 AUTO
S 11867000 V 22000000 AUTO
S 11874000 H 22000000 AUTO
S 11898000 V 22000000 AUTO
S 11966000 H 22000000 AUTO
S 11991000 V 22000000 AUTO
S 12053000 V 22000000 AUTO
S 12084000 V 22000000 AUTO
S 12090000 H 20000000 AUTO
S 12115000 V 22425000 AUTO
S 12122000 H 22000000 AUTO
S 12146000 V 22000000 AUTO
S 12152000 H 20000000 AUTO
S 12177000 V 23000000 AUTO