diff -urN gkII-0.4.5/CHANGES gkII-0.4.5i/CHANGES --- gkII-0.4.5/CHANGES 2006-11-20 00:22:34.000000000 +0000 +++ gkII-0.4.5i/CHANGES 2006-11-20 20:12:44.365152016 +0000 @@ -1,3 +1,14 @@ +gkII-0.4.5i + In gkII-0.4.5, the colour palette was not duplicated when duplicate + or zoom in new window were used, it is now working again. + + Invert has moved from palette menu to palette functions dialog. + + Re-allowed choice of Kunge types when bailing on Mandel. + + Removed -ffast-math optimisation from Makefile - "...might have a + reduced precision". + gkII-0.4.5 Renamed "Cancel" buttons to "Dismiss" buttons so as to not imply cancellation of pressing "Apply". diff -urN gkII-0.4.5/fracset_dlg.c gkII-0.4.5i/fracset_dlg.c --- gkII-0.4.5/fracset_dlg.c 2006-11-19 21:53:38.000000000 +0000 +++ gkII-0.4.5i/fracset_dlg.c 2006-11-20 17:53:20.250690688 +0000 @@ -283,7 +283,6 @@ { dr_par p1 = gtk_combo_box_get_active(GTK_COMBO_BOX(fsd->in_par)); dr_par p2 = gtk_combo_box_get_active(GTK_COMBO_BOX(fsd->out_par)); - bail_type bt = gtk_combo_box_get_active(GTK_COMBO_BOX(fsd->bail)); if (p1 == PAR_OFF && p2 == PAR_OFF) { gtk_widget_set_sensitive(fsd->frac_frame, FALSE); gtk_widget_set_sensitive(fsd->pert_frame, FALSE); @@ -308,10 +307,6 @@ gtk_widget_set_sensitive(fsd->out_scale, TRUE); gtk_widget_set_sensitive(fsd->outscale_label, TRUE); } - if (bt == BT_MAND) - gtk_widget_set_sensitive(fsd->kunge, FALSE); - else - gtk_widget_set_sensitive(fsd->kunge, TRUE); return; } diff -urN gkII-0.4.5/fractal.c gkII-0.4.5i/fractal.c --- gkII-0.4.5/fractal.c 2006-11-18 00:28:04.000000000 +0000 +++ gkII-0.4.5i/fractal.c 2006-11-20 20:52:26.906950608 +0000 @@ -49,7 +49,7 @@ long double wkf, wkf2; /* Mandelbrot */ - double mz; + double mz; long double mre = 0, mim = 0; long double mre2 = 0, mim2 = 0; @@ -59,8 +59,8 @@ long double lre = 0, lim = 0; long double lre2 = 0, lim2 = 0; - /* Klunge */ - double kz; + /* Klunge */ + double kz; long double kre = 0, kim = 0; long double kre2 = 0, kim2 = 0; long double krf = 0, krf2 = 0; /* aux */ diff -urN gkII-0.4.5/INSTALL gkII-0.4.5i/INSTALL --- gkII-0.4.5/INSTALL 2006-11-20 00:12:30.000000000 +0000 +++ gkII-0.4.5i/INSTALL 2006-11-20 20:12:57.756116280 +0000 @@ -13,7 +13,7 @@ but if not: * GTK2: ftp://ftp.gtk.org/ - * libpng: http://www.cdrom.com/pub/png/ + * libpng: http://www.libpng.org/ * zlib: http://www.zlib.org/ * pkg-config http://pkgconfig.freedesktop.org/ diff -urN gkII-0.4.5/main.c gkII-0.4.5i/main.c --- gkII-0.4.5/main.c 2006-11-19 23:56:15.000000000 +0000 +++ gkII-0.4.5i/main.c 2006-11-20 17:17:20.589009168 +0000 @@ -113,7 +113,7 @@ static gint child_reaper(gpointer nothing); -static void invert(void); +/*static void invert(void);*/ static void switch_fractal_type(void); static void print_help(void); static void print_version(void); @@ -271,6 +271,7 @@ } } +/* void invert(void) { palette_invert(); @@ -280,6 +281,7 @@ rgb_invert(&img); redraw_image(&img); } +*/ void save_cmd(void) { @@ -515,15 +517,6 @@ /* default values for options */ opts.timing = 0; - rnd_palette.r_strength = 0.85; - rnd_palette.r_bands = 0.05; - rnd_palette.g_strength = 0.79; - rnd_palette.g_bands = 0.08; - rnd_palette.b_strength = 0.83; - rnd_palette.b_bands = 0.2; - rnd_palette.offset = 0; - rnd_palette.stripe = 1; - rnd_palette.spread = 1; img.rnd_pal = &rnd_palette; fun_palette.offset = 0; @@ -1011,8 +1004,9 @@ menu_add(menu, NULL, NULL); menu_add(menu, "Load", load_palette_cmd); menu_add(menu, NULL, NULL); - menu_add(menu, "Invert", invert); +/* menu_add(menu, "Invert", invert);*/ menu_add(menu, "Cycle...", do_pal_rot_dialog); + menu_add(menu, NULL, NULL); menu_add(menu, "Randomize", do_pal_rnd_dialog); menu_add(menu, "Functions", do_pal_fun_dialog); menu_bar_add(menu_bar, menu, "Palette"); @@ -1587,7 +1581,27 @@ img.filesel = NULL; + /* init random palette move to here from init_misc() */ + rnd_palette.r_strength = 0.85; + rnd_palette.r_bands = 0.05; + rnd_palette.g_strength = 0.79; + rnd_palette.g_bands = 0.08; + rnd_palette.b_strength = 0.83; + rnd_palette.b_bands = 0.2; + rnd_palette.offset = 0.0; + rnd_palette.stripe = 1.0; + rnd_palette.spread = 1.0; + palette = g_malloc(256*4); + if (palette_load(DEFAULT_PALETTE_FILE) == FALSE || + palette_load(DEFAULT_PALETTE_FILE2) == FALSE) + { /* initial palette loading or generation must take place + here, otherwise palette copying when duplicating, breaks. */ + rnd_palette.r_strength = 1.0; + rnd_palette.g_strength = 1.0; + rnd_palette.b_strength = 1.0; + palette_randomize(&rnd_palette); + } init_misc(); process_args(argc, argv); @@ -1595,14 +1609,6 @@ set_image_info(&img, img.user_width, img.user_height, img.aa_factor); set_image_info(&j_pre, JPRE_SIZE, JPRE_SIZE/img.ratio, JPRE_AAFACTOR); - if (palette_load(DEFAULT_PALETTE_FILE) == FALSE) { - if (palette_load(DEFAULT_PALETTE_FILE2) == FALSE) { - rnd_palette.r_strength = 1.0; - rnd_palette.g_strength = 1.0; - rnd_palette.b_strength = 1.0; - palette_randomize(&rnd_palette); - } - } /* main window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); diff -urN gkII-0.4.5/Makefile gkII-0.4.5i/Makefile --- gkII-0.4.5/Makefile 2006-11-19 20:07:09.000000000 +0000 +++ gkII-0.4.5i/Makefile 2006-11-20 19:33:31.693812424 +0000 @@ -5,7 +5,7 @@ DEFS := -Wall -ansi -pedantic -D_GNU_SOURCE -DGDK_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED #CFLAGS := $(DEFS) -Wall -g2 -DDEBUG_PAR -CFLAGS := $(DEFS) -O2 -fomit-frame-pointer -ffast-math -Winline +CFLAGS := $(DEFS) -O2 -fomit-frame-pointer -Winline LIBS := -lpng -lz SRC := $(wildcard *.c) diff -urN gkII-0.4.5/misc.c gkII-0.4.5i/misc.c --- gkII-0.4.5/misc.c 2006-08-19 13:07:40.000000000 +0100 +++ gkII-0.4.5i/misc.c 2006-11-20 17:15:40.985151256 +0000 @@ -82,9 +82,9 @@ als->in_scale); printf("\nout_scale %f = %f", img->auto_settings.out_scale, als->out_scale); - printf("\nkunge %s = %s", kung_type_names[img->auto_settings.kunge], + printf("\nkunge %s = %s", kung_type_names[img->auto_settings.kunge], kung_type_names[als->kunge]); - printf("\nbail %s = %s", bail_type_names[img->auto_settings.bail], + printf("\nbail %s = %s", bail_type_names[img->auto_settings.bail], bail_type_names[als->bail]); printf("\nlayers %d = %d", img->auto_settings.layer_count, als->layer_count); @@ -252,6 +252,7 @@ } } +/* void rgb_invert(image_info* img) { int x,y; @@ -268,3 +269,4 @@ } } } +*/ diff -urN gkII-0.4.5/misc.h gkII-0.4.5i/misc.h --- gkII-0.4.5/misc.h 2006-08-19 13:07:40.000000000 +0100 +++ gkII-0.4.5i/misc.h 2006-11-20 17:15:59.638315544 +0000 @@ -14,8 +14,9 @@ void set_fracset_info(image_info* img, fractal_settings* frs); void set_userpar_info(image_info* img, user_params* ups); void clear_image(image_info* img, gboolean raw, gboolean rgb); -void rgb_invert(image_info* img); void do_anti_aliasing(image_info* img, int x0, int y0, int width, int height); +/*void rgb_invert(image_info* img);*/ + #endif /* __MISC_H */ diff -urN gkII-0.4.5/palette.c gkII-0.4.5i/palette.c --- gkII-0.4.5/palette.c 2006-11-19 16:02:05.000000000 +0000 +++ gkII-0.4.5i/palette.c 2006-11-20 17:22:30.285928080 +0000 @@ -48,26 +48,14 @@ void palette_apply(image_info* img, int x0, int y0, int width, int height) { - int x,y; - for (y=y0; y < y0+height; y++) { - for (x=x0; x < x0 + width; x++) { - img->rgb_data[y*width + x] = get_pixel(img, x,y); + int x, y; + for (y = y0; y < y0 + height; y++) { + for (x = x0; x < x0 + width; x++) { + img->rgb_data[y * width + x] = get_pixel(img, x, y); } } } -void palette_invert(void) -{ - int i; - guint32 r,g,b; - for (i=0; i < pal_indexes; i++) { - r = 255-RED(palette[i]); - g = 255-GREEN(palette[i]); - b = 255-BLUE(palette[i]); - palette[i] = RGB(r,g,b); - } -} - void palette_randomize(random_palette* rnd_pal) { int i; @@ -188,6 +176,9 @@ case PF_ROT_RGB: palette[i] = RGB(g, b, r); break; + case PF_INV_RGB: + palette[i] = RGB(255 - r, 255 - g, 255 - b); + break; case PF_INV_R: palette[i] = RGB(255 - r, g, b); break; @@ -208,7 +199,7 @@ { int i, max; guint32 temp; - + max = pal_indexes-1; temp = palette[0]; for (i=0; i < max; i++) @@ -228,21 +219,6 @@ palette[0] = temp; } -/* -guint32 get_pixel(image_info* img, int x, int y) -{ - guint32 c; - - c = img->raw_data[y*img->real_width + x]; - if (c == UINT_MAX) - return palette[0]; - - c = (c%(pal_indexes-1))+1; - - return palette[c]; -} -*/ - guint32 get_pixel(image_info* img, int x, int y) { if (img->palette_ip) diff -urN gkII-0.4.5/palette.h gkII-0.4.5i/palette.h --- gkII-0.4.5/palette.h 2006-11-19 16:14:48.000000000 +0000 +++ gkII-0.4.5i/palette.h 2006-11-20 17:08:57.177539344 +0000 @@ -24,7 +24,6 @@ char* palette_get_filename(void); void palette_apply(image_info* img, int x0, int y0, int width, int height); -void palette_invert(void); void palette_rotate_backward(void); void palette_rotate_forward(void); void palette_randomize(random_palette* rndpal); diff -urN gkII-0.4.5/pal_fun_dlg.c gkII-0.4.5i/pal_fun_dlg.c --- gkII-0.4.5/pal_fun_dlg.c 2006-11-19 15:57:52.000000000 +0000 +++ gkII-0.4.5i/pal_fun_dlg.c 2006-11-20 17:24:02.392925688 +0000 @@ -108,6 +108,10 @@ g_signal_connect(GTK_OBJECT(dl->rot_rgb_button), "clicked", GTK_SIGNAL_FUNC(pal_fun_buttonfunc), dl); + dl->inv_rgb_button = gtk_button_new_with_label("Invert RGB"); + g_signal_connect(GTK_OBJECT(dl->inv_rgb_button), "clicked", + GTK_SIGNAL_FUNC(pal_fun_buttonfunc), dl); + dl->inv_r_button = gtk_button_new_with_label("Invert Red"); g_signal_connect(GTK_OBJECT(dl->inv_r_button), "clicked", GTK_SIGNAL_FUNC(pal_fun_buttonfunc), dl); @@ -126,6 +130,8 @@ FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(fn_box), dl->rot_rgb_button, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(fn_box), dl->inv_rgb_button, + FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(fn_box), dl->inv_r_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(fn_box), dl->inv_g_button, @@ -167,6 +173,8 @@ else if (widget == dl->ex_br_button) dl->fun_pal->func = PF_EX_BR; else if (widget == dl->rot_rgb_button) dl->fun_pal->func = PF_ROT_RGB; + else if (widget == dl->inv_rgb_button) + dl->fun_pal->func = PF_INV_RGB; else if (widget == dl->inv_r_button) dl->fun_pal->func = PF_INV_R; else if (widget == dl->inv_g_button) dl->fun_pal->func = PF_INV_G; else if (widget == dl->inv_b_button) dl->fun_pal->func = PF_INV_B; diff -urN gkII-0.4.5/pal_fun_dlg.h gkII-0.4.5i/pal_fun_dlg.h --- gkII-0.4.5/pal_fun_dlg.h 2006-11-19 15:52:49.000000000 +0000 +++ gkII-0.4.5i/pal_fun_dlg.h 2006-11-20 17:06:28.105201784 +0000 @@ -7,18 +7,19 @@ typedef struct { GtkWidget* window; - GtkWidget* offset; - GtkWidget* stripe; - GtkWidget* spread; GtkWidget* ex_rg_button; GtkWidget* ex_gb_button; GtkWidget* ex_br_button; GtkWidget* rot_rgb_button; + GtkWidget* inv_rgb_button; GtkWidget* inv_r_button; GtkWidget* inv_g_button; GtkWidget* inv_b_button; GtkWidget* close_button; GtkWidget* dismiss_button; + GtkWidget* offset; + GtkWidget* stripe; + GtkWidget* spread; function_palette* fun_pal; } palette_fun_dialog; diff -urN gkII-0.4.5/random_palette.h gkII-0.4.5i/random_palette.h --- gkII-0.4.5/random_palette.h 2006-11-19 15:50:20.000000000 +0000 +++ gkII-0.4.5i/random_palette.h 2006-11-20 17:13:30.620969624 +0000 @@ -8,6 +8,7 @@ PF_EX_GB, PF_EX_BR, PF_ROT_RGB, + PF_INV_RGB, PF_INV_R, PF_INV_G, PF_INV_B diff -urN gkII-0.4.5/README gkII-0.4.5i/README --- gkII-0.4.5/README 2006-11-20 00:36:35.000000000 +0000 +++ gkII-0.4.5i/README 2006-11-20 20:16:34.803120120 +0000 @@ -77,8 +77,13 @@ cause bailout, or, only when 'both' have bailed. Kunge type: - This setting does not apply to the Mandel bail type. There is a choice - of five secondary equations. The names are cheekily arbitrary. + There is a choice of five secondary equations. The names are cheekily + arbitrary. This setting can actually apply to the Mandel bail type, just + because the bail type is Mandel does not prevent the Kunge equation from + being used. + + With the bail type set to kunge and the kunge type as no kunge, the + resulting image will be blank. Auto Layer Settings ------------------- diff -urN gkII-0.4.5/TODO gkII-0.4.5i/TODO --- gkII-0.4.5/TODO 2006-11-20 00:20:18.000000000 +0000 +++ gkII-0.4.5i/TODO 2006-11-20 17:35:43.951272608 +0000 @@ -1,5 +1,11 @@ +* Add command line options for a)loading up a gk2 file, b) specifying one + of width/height (maintain aspect ratio). -* Make .gk2 files human readable instead of binary. +* Add command line option to output direct to file, when loading gk2 file, + and without the gui appearing, ie batch mode. + +* Make .gk2 files human readable instead of binary. (what put me off was + difficulty of displaying long doubles with printf I think?) * Allow user to save colour palettes. @@ -11,7 +17,7 @@ use it well. So until I've got a postfix to infix converter running it's combo boxes all the way. -* * * * * * Lots of tidying... * * * * * +* * * * * * Lots of tidying * * * * * * Cropping diff -urN gkII-0.4.5/version.h gkII-0.4.5i/version.h --- gkII-0.4.5/version.h 2006-11-19 15:32:48.000000000 +0000 +++ gkII-0.4.5i/version.h 2006-11-20 18:28:43.608891176 +0000 @@ -1,6 +1,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION "0.4.5" +#define VERSION "0.4.5i" #endif /* __VERSION_H */