reverted cosmetic fix below, broke zoomed updates

* app/gdisplay.c: reverted cosmetic fix below, broke zoomed updates

* configure.in: changes to xdelta and jpeg checks

* updated bmp plugin

* portability patch for polar

* minor bugfix to vpropagate

* fix for memory problem in xwd

-Yosh
This commit is contained in:
Manish Singh 1998-04-11 22:07:00 +00:00
parent e24ac468a2
commit cca539e440
14 changed files with 95 additions and 85 deletions

View File

@ -1,3 +1,18 @@
Sat Apr 11 15:03:43 PDT 1998 Manish Singh <yosh@gimp.org>
* app/gdisplay.c: reverted cosmetic fix below, broke zoomed
updates
* configure.in: changes to xdelta and jpeg checks
* updated bmp plugin
* portability patch for polar
* minor bugfix to vpropagate
* fix for memory problem in xwd
Sat Apr 11 00:03:33 PDT 1998 Manish Singh <yosh@gimp.org>
* Made 0.99.25 release
@ -205,7 +220,7 @@ Thu Apr 2 15:34:22 MEST 1998 Sven Neumann <sven@gimp.org>
* updated iwarp to the version on the registry and reapplied
(hopefully) all portability-patches that were applied in between
Wed Apr 1 11:10:15 EST 1998 Matthew Wilson <msw@gimp.org
Wed Apr 1 11:10:15 EST 1998 Matthew Wilson <msw@gimp.org>
* app/brightness_contrast.c
* app/by_color_select.c

View File

@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp,
GArea * ga;
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */;
ga->x1 = BOUNDS (x, 0, gdisp->gimage->width);
ga->y1 = BOUNDS (y, 0, gdisp->gimage->height);
ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga);
}
@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp,
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */;
ga->x1 = BOUNDS (x, 0, gdisp->disp_width);
ga->y1 = BOUNDS (y, 0, gdisp->disp_height);
ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width);
ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height);
gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga);
}
@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp,
int h)
{
int x1, y1, x2, y2;
int xb, yb, wb, hb;
/* Bounds check */
x1 = BOUNDS (x, 0, gdisp->gimage->width);
y1 = BOUNDS (y, 0, gdisp->gimage->height);
x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
xb = x1;
yb = y1;
wb = (x2 - x1);
hb = (y2 - y1);
x = x1;
y = y1;
w = (x2 - x1);
h = (y2 - y1);
/* calculate the extents of the update as limited by what's visible */
gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE);
gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE);
gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2);
gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2);
/* display the area */
gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE);
/* expose needs to be done on the unbounded area */
gdisplay_expose_area (gdisp, x, y, w, h);
gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE);
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
}

View File

@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp,
GArea * ga;
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */;
ga->x1 = BOUNDS (x, 0, gdisp->gimage->width);
ga->y1 = BOUNDS (y, 0, gdisp->gimage->height);
ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga);
}
@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp,
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */;
ga->x1 = BOUNDS (x, 0, gdisp->disp_width);
ga->y1 = BOUNDS (y, 0, gdisp->disp_height);
ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width);
ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height);
gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga);
}
@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp,
int h)
{
int x1, y1, x2, y2;
int xb, yb, wb, hb;
/* Bounds check */
x1 = BOUNDS (x, 0, gdisp->gimage->width);
y1 = BOUNDS (y, 0, gdisp->gimage->height);
x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
xb = x1;
yb = y1;
wb = (x2 - x1);
hb = (y2 - y1);
x = x1;
y = y1;
w = (x2 - x1);
h = (y2 - y1);
/* calculate the extents of the update as limited by what's visible */
gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE);
gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE);
gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2);
gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2);
/* display the area */
gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE);
/* expose needs to be done on the unbounded area */
gdisplay_expose_area (gdisp, x, y, w, h);
gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE);
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
}

View File

@ -631,11 +631,10 @@ gdisplay_add_update_area (GDisplay *gdisp,
GArea * ga;
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->gimage->width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->gimage->height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->gimage->width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->gimage->height) */;
ga->x1 = BOUNDS (x, 0, gdisp->gimage->width);
ga->y1 = BOUNDS (y, 0, gdisp->gimage->height);
ga->x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
ga->y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
gdisp->update_areas = gdisplay_process_area_list (gdisp->update_areas, ga);
}
@ -652,10 +651,10 @@ gdisplay_add_display_area (GDisplay *gdisp,
ga = (GArea *) g_malloc (sizeof (GArea));
ga->x1 = x /* BOUNDS (x, 0, gdisp->disp_width) */;
ga->y1 = y /* BOUNDS (y, 0, gdisp->disp_height) */;
ga->x2 = x + w /* BOUNDS (x + w, 0, gdisp->disp_width) */;
ga->y2 = y + h /* BOUNDS (y + h, 0, gdisp->disp_height) */;
ga->x1 = BOUNDS (x, 0, gdisp->disp_width);
ga->y1 = BOUNDS (y, 0, gdisp->disp_height);
ga->x2 = BOUNDS (x + w, 0, gdisp->disp_width);
ga->y2 = BOUNDS (y + h, 0, gdisp->disp_height);
gdisp->display_areas = gdisplay_process_area_list (gdisp->display_areas, ga);
}
@ -669,31 +668,27 @@ gdisplay_paint_area (GDisplay *gdisp,
int h)
{
int x1, y1, x2, y2;
int xb, yb, wb, hb;
/* Bounds check */
x1 = BOUNDS (x, 0, gdisp->gimage->width);
y1 = BOUNDS (y, 0, gdisp->gimage->height);
x2 = BOUNDS (x + w, 0, gdisp->gimage->width);
y2 = BOUNDS (y + h, 0, gdisp->gimage->height);
xb = x1;
yb = y1;
wb = (x2 - x1);
hb = (y2 - y1);
x = x1;
y = y1;
w = (x2 - x1);
h = (y2 - y1);
/* calculate the extents of the update as limited by what's visible */
gdisplay_untransform_coords (gdisp, 0, 0, &x1, &y1, FALSE, FALSE);
gdisplay_untransform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE, FALSE);
gimage_invalidate (gdisp->gimage, xb, yb, wb, hb, x1, y1, x2, y2);
gimage_invalidate (gdisp->gimage, x, y, w, h, x1, y1, x2, y2);
/* display the area */
gdisplay_transform_coords (gdisp, xb, yb, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, xb + wb, yb + hb, &x2, &y2, FALSE);
/* expose needs to be done on the unbounded area */
gdisplay_expose_area (gdisp, x, y, w, h);
gdisplay_transform_coords (gdisp, x, y, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, x + w, y + h, &x2, &y2, FALSE);
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
}

View File

@ -135,7 +135,8 @@ dnl Test for libjpeg
if test "$jpeg_ok" = yes; then
AC_MSG_CHECKING([for jpeg.h])
AC_TRY_COMPILE(
[#undef PACKAGE
[#include <stdio.h>
#undef PACKAGE
#undef VERSION
#include <jpeglib.h>],
jpeg_ok=yes,
@ -185,9 +186,11 @@ dnl Test for libmpeg
dnl Test for libxdelta
if test -z "$LIBXDELTA_LIB"; then
AC_CHECK_LIB(xdelta, xd_checkin,
xdelta_ok=yes,
xdelta_ok=yes ; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm',
AC_CHECK_LIB(xdelta, xd_checkout,
xdelta_ok=yes ; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm -lz',
xdelta_ok=no
AC_MSG_WARN(*** XD plug-in will not be built (XDELTA library not found) ***), -lglib -lgdbm)
AC_MSG_WARN(*** XD plug-in will not be built (XDELTA library not found) ***), -lglib -lgdbm -lz), -lglib -lgdbm)
if test "$xdelta_ok" = yes; then
AC_MSG_CHECKING([for xdelta.h])
AC_TRY_CPP(
@ -197,7 +200,7 @@ dnl Test for libxdelta
xdelta_ok=no)
AC_MSG_RESULT($xdelta_ok)
if test "$xdelta_ok" = yes; then
XD='xd'; LIBXDELTA_LIB='-lxdelta -lglib -lgdbm'
XD='xd'
else
AC_MSG_WARN(*** XD plug-in will not be built (XDELTA header file not found) ***)
fi

View File

@ -1,5 +1,5 @@
/* bmp.c */
/* Version 0.42 */
/* Version 0.43 */
/* This is a File input and output filter for */
/* Gimp. It loads and saves images in windows(TM) */
/* bitmap format. */
@ -14,6 +14,8 @@
/* 16.03.1998 Endian-independent!! */
/* 21.03.1998 Little Bug-fix */
/* 06.04.1998 Bugfix in Padding */
/* 11.04.1998 Arch. cleanup (-Wall) */
/* Parses gtkrc */
/*
* The GIMP -- an image manipulation program
@ -64,6 +66,7 @@ GPlugInInfo PLUG_IN_INFO =
NULL, /* quit_proc */
query, /* query_proc */
run, /* run_proc */
};
MAIN ()

View File

@ -9,7 +9,7 @@
#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0)
#define Write(file,buffer,len) fwrite(buffer, len, 1, file)
#define WriteOK(file,buffer,len) (Write(file,buffer,len) != 0)
#define WriteOK(file,buffer,len) (Write(buffer, len, file) != 0)
extern gint32 ToL(guchar *);
extern void FromL(gint32, guchar *);
@ -57,3 +57,4 @@ struct
unsigned short bcPlanes; /* 16 */
unsigned short bcBitCnt; /* 18 */
}Bitmap_OS2_Head;

View File

@ -408,6 +408,7 @@ save_dialog ()
argv[0] = g_strdup ("bmp");
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc());
dlg = gtk_dialog_new ();

View File

@ -1032,7 +1032,7 @@ dialog_update_preview(void)
double left, right, bottom, top;
double dx, dy;
double px, py;
double cx, cy;
double cx = 0.0, cy = 0.0;
int ix, iy;
int x, y;
double scale_x, scale_y;

View File

@ -1,7 +1,7 @@
/* vpropagate.c -- This is a plug-in for the GIMP (1.0's API)
* Author: Shuji Narazaki <narazaki@InetQ.or.jp>
* Time-stamp: <1997/10/24 20:09:07 narazaki@InetQ.or.jp>
* Version: 0.89
* Time-stamp: <1998/04/11 19:46:08 narazaki@InetQ.or.jp>
* Version: 0.89a
*
* Copyright (C) 1996-1997 Shuji Narazaki <narazaki@InetQ.or.jp>
*
@ -252,7 +252,7 @@ query ()
"Shuji Narazaki",
"1996-1997",
MENU_POSITION,
"RGB*",
"RGB*,GRAY*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args, return_vals);

View File

@ -42,8 +42,9 @@
* Set gimp b/w-colormap if no xwdcolormap present
* V 1.91, PK, 05-Apr-97: Return all arguments, even in case of an error
* V 1.92, PK, 12-Oct-97: No progress bars for non-interactive mode
* V 1.93, PK, 11-Apr-98: Fix problem with overwriting memory
*/
static char ident[] = "@(#) GIMP XWD file-plugin v1.92 12-Oct-97";
static char ident[] = "@(#) GIMP XWD file-plugin v1.93 11-Apr-98";
#include <stdio.h>
#include <stdlib.h>
@ -1275,7 +1276,7 @@ load_xwd_f2_d16_b16 (char *filename,
data = g_malloc (tile_height * width * 3);
/* Get memory for mapping 16 bit XWD-pixel to GIMP-RGB */
maxval = 0xffff * 3;
maxval = 0x10000 * 3;
ColorMap = (unsigned char *)g_malloc (maxval);
if (ColorMap == NULL)
{

View File

@ -1032,7 +1032,7 @@ dialog_update_preview(void)
double left, right, bottom, top;
double dx, dy;
double px, py;
double cx, cy;
double cx = 0.0, cy = 0.0;
int ix, iy;
int x, y;
double scale_x, scale_y;

View File

@ -1,7 +1,7 @@
/* vpropagate.c -- This is a plug-in for the GIMP (1.0's API)
* Author: Shuji Narazaki <narazaki@InetQ.or.jp>
* Time-stamp: <1997/10/24 20:09:07 narazaki@InetQ.or.jp>
* Version: 0.89
* Time-stamp: <1998/04/11 19:46:08 narazaki@InetQ.or.jp>
* Version: 0.89a
*
* Copyright (C) 1996-1997 Shuji Narazaki <narazaki@InetQ.or.jp>
*
@ -252,7 +252,7 @@ query ()
"Shuji Narazaki",
"1996-1997",
MENU_POSITION,
"RGB*",
"RGB*,GRAY*",
PROC_PLUG_IN,
nargs, nreturn_vals,
args, return_vals);

View File

@ -42,8 +42,9 @@
* Set gimp b/w-colormap if no xwdcolormap present
* V 1.91, PK, 05-Apr-97: Return all arguments, even in case of an error
* V 1.92, PK, 12-Oct-97: No progress bars for non-interactive mode
* V 1.93, PK, 11-Apr-98: Fix problem with overwriting memory
*/
static char ident[] = "@(#) GIMP XWD file-plugin v1.92 12-Oct-97";
static char ident[] = "@(#) GIMP XWD file-plugin v1.93 11-Apr-98";
#include <stdio.h>
#include <stdlib.h>
@ -1275,7 +1276,7 @@ load_xwd_f2_d16_b16 (char *filename,
data = g_malloc (tile_height * width * 3);
/* Get memory for mapping 16 bit XWD-pixel to GIMP-RGB */
maxval = 0xffff * 3;
maxval = 0x10000 * 3;
ColorMap = (unsigned char *)g_malloc (maxval);
if (ColorMap == NULL)
{