Skip to content

Commit 997209b

Browse files
committed
Merge branch 'nip4' of github.com:libvips/nip2 into nip4
2 parents c37fab5 + c170af5 commit 997209b

24 files changed

+699
-120
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
started 8.9.1 15/2/23
2+
- fix build with --std=c99 [Schamschula]
3+
14
started 8.9.0 10/4/20
25
- add find_trim
36

Fred

Lines changed: 567 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ Status](https://build.snapcraft.io/badge/jcupitt/nip2.svg)](https://build.snapcr
66
nip2 is a GUI for the [libvips image processing
77
library](https://libvips.github.io/libvips). It's a little like a spreadsheet:
88
you create a set of formula connecting your objects together, and on a change
9-
nip2 recalculates.
9+
nip2 will recalculate. This makes it convenient for developing image processing
10+
systems since you can watch pixels change as you adjust your equations.
11+
12+
Because nip2 uses libvips as the image processing engine it can handle very
13+
large images and only needs a little memory. It scales to fairly complex
14+
workflows: I've used it to develop systems with more than 10,000 cells,
15+
analyzing images of many tens of gigabytes. It has a batch mode, so you
16+
can run any image processing system you develop from the command-line and
17+
without a GUI.
1018

1119
[![Screenshot](screenshot.png)](screenshot.png)
1220

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Process this file with autoconf to produce a configure script.
22

3-
AC_INIT([nip4], [8.9.0], [vipsip@jiscmail.ac.uk])
3+
AC_INIT([nip4], [8.9.1], [vipsip@jiscmail.ac.uk])
44

55
# foreign stops complaints about a missing README (we use README.md instead)
66
# and missing INSTALL (the standard Gnu INSTALL is not very useful)
@@ -17,7 +17,7 @@ dnl
1717

1818
m4_define([nip_major_version], [8])
1919
m4_define([nip_minor_version], [9])
20-
m4_define([nip_micro_version], [0])
20+
m4_define([nip_micro_version], [1])
2121
m4_define([nip_version],
2222
[nip_major_version.nip_minor_version.nip_micro_version])
2323

nip4.spec

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: nip4
2-
Version: 8.9.0
2+
Version: 8.9.1
33
Release: 1%{?dist}
44
Summary: Interactive tool for working with large images
55

@@ -19,12 +19,12 @@ BuildRequires: desktop-file-utils
1919

2020
# description taken from Debian package
2121
%description
22-
nip2 is a graphical front end to the VIPS package.
23-
With nip2, rather than directly editing images, you build
22+
nip4 is a graphical front end to the VIPS package.
23+
With nip4, rather than directly editing images, you build
2424
relationships between objects in a spreadsheet-like fashion. When you
25-
make a change somewhere, nip2 recalculates the objects affected by
25+
make a change somewhere, nip4 recalculates the objects affected by
2626
that change. Since it is demand-driven this update is very fast, even
27-
for very, very large images. nip2 is very good at creating pipelines
27+
for very, very large images. nip4 is very good at creating pipelines
2828
of image manipulation operations. It is not very good for image
2929
editing tasks like touching up photographs. For that, a tool like the
3030
GIMP should be used instead.
@@ -44,32 +44,32 @@ rm -rf $RPM_BUILD_ROOT
4444
make install DESTDIR=$RPM_BUILD_ROOT
4545

4646
# delete doc (we will get it later with %doc)
47-
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/nip2
47+
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/nip4
4848

4949
# malkovich??
5050
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/malkovich
5151

52-
# the nip2 post install hook seems to run update-mime-database, but we
52+
# the nip4 post install hook seems to run update-mime-database, but we
5353
# need to run it in post
5454
rm -rf $RPM_BUILD_ROOT%{_datadir}/mime
5555
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages
56-
cp -a nip2.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages
56+
cp -a nip4.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages
5757

5858
# same with desktop file
5959
rm -rf $RPM_BUILD_ROOT%{_datadir}/applications
6060

6161
# locale stuff
62-
%find_lang nip2
62+
%find_lang nip4
6363

6464
# icon
6565
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
66-
cp -a share/nip2/data/vips-128.png \
67-
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/nip2.png
66+
cp -a share/nip4/data/vips-128.png \
67+
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/nip4.png
6868

6969
# desktop file
7070
desktop-file-install --vendor fedora \
7171
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
72-
nip2.desktop
72+
nip4.desktop
7373

7474

7575
%post
@@ -104,16 +104,16 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
104104
rm -rf $RPM_BUILD_ROOT
105105

106106

107-
%files -f nip2.lang
107+
%files -f nip4.lang
108108
%defattr(-,root,root,-)
109109
%doc doc/html doc/pdf AUTHORS ChangeLog COPYING NEWS THANKS TODO
110-
%{_bindir}/nip2
111-
%{_bindir}/run-nip2.sh
112-
%{_datadir}/nip2
113-
%{_mandir}/man1/nip2.1.gz
110+
%{_bindir}/nip4
111+
%{_bindir}/run-nip4.sh
112+
%{_datadir}/nip4
113+
%{_mandir}/man1/nip4.1.gz
114114
%{_datadir}/icons/hicolor/*/apps/*
115115
%{_datadir}/applications/*
116-
%{_datadir}/mime/packages/nip2.xml
116+
%{_datadir}/mime/packages/nip4.xml
117117

118118

119119
%changelog

src/Makefile.am

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,25 @@ CLI_DIST = nip4-cli.c
1919
endif
2020

2121
nip4_SOURCES = \
22+
vipsobject.c \
23+
vipsobject.h \
24+
plotmodel.c \
25+
plotmodel.h \
26+
progress.c \
27+
progress.h \
28+
panechild.h \
29+
plotpresent.c \
30+
plotpresent.h \
31+
plotstatus.h \
32+
floatwindow.h \
33+
vobject.c \
34+
vobject.h \
2235
action.c \
2336
action.h \
24-
boxes.c \
2537
boxes.h \
38+
popupbutton.h \
39+
imageheader.h \
40+
preview.h \
2641
builtin.c \
2742
builtin.h \
2843
cache.c \
@@ -65,6 +80,17 @@ nip4_SOURCES = \
6580
expr.h \
6681
filemodel.c \
6782
filemodel.h \
83+
pane.h \
84+
pathname.c \
85+
pathname.h \
86+
fontname.c \
87+
fontname.h \
88+
group.c \
89+
group.h \
90+
pathnameview.c \
91+
pathnameview.h \
92+
fontnameview.c \
93+
fontnameview.h \
6894
filesel.c \
6995
filesel.h \
7096
floatwindow.c \

src/colourdisplay.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ enum {
4343
G_DEFINE_TYPE( Colourdisplay, colourdisplay, TYPE_IMAGEDISPLAY );
4444

4545
/* Prefer x-color drags for 3 band non-complex imageinfos, and for LABQ
46-
*/
4746
static void
4847
colourdisplay_set_drag_type( Colourdisplay *colourdisplay )
4948
{
@@ -80,13 +79,12 @@ colourdisplay_set_drag_type( Colourdisplay *colourdisplay )
8079
GDK_ACTION_COPY );
8180
gtk_drag_source_unset( GTK_WIDGET( colourdisplay ) );
8281
// FIXME
83-
/*
8482
gtk_drag_source_set( GTK_WIDGET( colourdisplay ),
8583
GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
8684
targets, IM_NUMBER( text_targets ),
8785
GDK_ACTION_COPY | GDK_ACTION_MOVE );
88-
*/
8986
}
87+
*/
9088

9189
static void
9290
colourdisplay_realize( GtkWidget *widget )
@@ -95,9 +93,10 @@ colourdisplay_realize( GtkWidget *widget )
9593

9694
GTK_WIDGET_CLASS( colourdisplay_parent_class )->realize( widget );
9795

98-
colourdisplay_set_drag_type( colourdisplay );
96+
//colourdisplay_set_drag_type( colourdisplay );
9997
}
10098

99+
/*
101100
static void
102101
colourdisplay_drag_begin( GtkWidget *widget, GdkDragContext *context )
103102
{
@@ -110,9 +109,7 @@ colourdisplay_drag_begin( GtkWidget *widget, GdkDragContext *context )
110109
g_object_set_data_full( G_OBJECT( widget ),
111110
"nip-drag-window", window,
112111
(GDestroyNotify) gtk_widget_destroy );
113-
#ifdef DEBUG
114112
printf( "colourdisplay_drag_begin: generating drag swatch colour\n" );
115-
#endif /*DEBUG*/
116113
imageinfo_to_rgb( IMAGEDISPLAY( colourdisplay )->conv->ii, colours );
117114
bg.red = 0xffff * colours[0];
118115
bg.green = 0xffff * colours[1];
@@ -121,6 +118,7 @@ colourdisplay_drag_begin( GtkWidget *widget, GdkDragContext *context )
121118
122119
gtk_drag_set_icon_widget( context, window, -2, -2 );
123120
}
121+
*/
124122

125123
static void
126124
colourdisplay_drag_end( GtkWidget *widget, GdkDragContext *context )

src/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ compile_graph( Compile *compile, ParseNode *pn, PElement *out )
788788
break;
789789

790790
case PARSE_CONST_BOOL:
791-
PEPUTP( out, ELEMENT_BOOL, pn->con.val.bool );
791+
PEPUTP( out, ELEMENT_BOOL, pn->con.val.bol );
792792
break;
793793

794794
case PARSE_CONST_ELIST:
@@ -2496,7 +2496,7 @@ compile_pattern_condition( Compile *compile,
24962496
int i;
24972497

24982498
n.type = PARSE_CONST_BOOL;
2499-
n.val.bool = TRUE;
2499+
n.val.bol = TRUE;
25002500
node = tree_const_new( compile, n );
25012501

25022502
for( i = depth - 1; i >= 0; i-- ) {

src/formula.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
(G_TYPE_CHECK_CLASS_TYPE( (klass), TYPE_FORMULA ))
3939

4040
typedef struct _Formula {
41+
// was GtkEventBox parent_object;
4142
GtkWidget parent_object;
4243

4344
/* State.
@@ -60,6 +61,7 @@ typedef struct _Formula {
6061
} Formula;
6162

6263
typedef struct _FormulaClass {
64+
// was GtkEventBoxClass parent_class;
6365
GtkWidgetClass parent_class;
6466

6567
/* My methods.

src/ip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ extern int statfs();
202202
#define IP_NAME PACKAGE "-" VERSION
203203
#define MAX_LINELENGTH (120) /* Max chars we display of value */
204204
#define MAX_RECENT (10) /* Number of recent items in file menu */
205-
#define NIP_COPYRIGHT "%s: ©2018 Imperial College, London"
205+
#define NIP_COPYRIGHT "%s: ©2023 libvips.org"
206206

207207
/* Our stock_ids.
208208
*/

src/iwindow.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,13 @@ struct _iWindow {
152152
guint parent_unmap_sid; /* Watch parent death here */
153153

154154
GtkWidget *work;
155-
/* FIXME
156-
GtkAccelGroup *accel_group;
157-
*/
155+
// GtkAccelGroup *accel_group;
158156
Infobar *infobar;
159157

160158
char *title;
161159

162160
/* Action stuff. We init this and add a few common actions to help out
163161
* subclasses.
164-
*/
165-
/* FIXME
166162
GtkActionGroup *action_group;
167163
GtkUIManager *ui_manager;
168164
*/
@@ -187,10 +183,7 @@ struct _iWindow {
187183
*/
188184
iWindowShape shape; /* Global shape ... for hglass */
189185
GSList *contexts; /* Set of other requested shapes */
190-
191-
/* FIXME
192-
GdkWindow *work_window;
193-
*/
186+
// GdkWindow *work_window; /* The window we actually set */
194187

195188
/* Size memorization.
196189
*/
@@ -238,18 +231,18 @@ void iwindow_notify_null( void *client, iWindowResult result );
238231

239232
GType iwindow_get_type( void );
240233

241-
GtkWidget *iwindow_new( void );
234+
GtkWidget *iwindow_new( GType type );
242235
void iwindow_set_title( iWindow *, const char *, ... )
243236
__attribute__((format(printf, 2, 3)));
244237
void iwindow_set_build( iWindow *, iWindowBuildFn, void *, void *, void * );
245238
void iwindow_set_popdown( iWindow *, iWindowFn, void * );
246239
void iwindow_set_size_prefs( iWindow *, const char *, const char * );
247-
void iwindow_set_work_window( iWindow *iwnd, GtkWindow *work_window );
240+
//void iwindow_set_work_window( iWindow *iwnd, GdkWindow *work_window );
248241
void iwindow_set_parent( iWindow *, GtkWidget *par );
249242

250243
void iwindow_build( iWindow * );
251244
void *iwindow_kill( iWindow * );
252-
void iwindow_kill_action_cb( GAction *action, iWindow *iwnd );
245+
//void iwindow_kill_action_cb( GtkAction *action, iWindow *iwnd );
253246

254247
GtkWidget *iwindow_get_root( GtkWidget *widget );
255248
GtkWidget *iwindow_get_root_noparent( GtkWidget *widget );

src/lex.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ TRUE {
207207
BEGIN BINARY;
208208

209209
yylval.yy_const.type = PARSE_CONST_BOOL;
210-
yylval.yy_const.val.bool = TRUE;
210+
yylval.yy_const.val.bol = TRUE;
211211

212212
return( TK_CONST );
213213
}
@@ -216,7 +216,7 @@ FALSE {
216216
BEGIN BINARY;
217217

218218
yylval.yy_const.type = PARSE_CONST_BOOL;
219-
yylval.yy_const.val.bool = FALSE;
219+
yylval.yy_const.val.bol = FALSE;
220220

221221
return( TK_CONST );
222222
}

src/log.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ typedef struct _LogClass {
4848

4949
/* How we want the menu bar built.
5050
*/
51-
GtkActionEntry *actions;
51+
//GtkActionEntry *actions;
5252
int n_actions;
53-
GtkToggleActionEntry *toggle_actions;
53+
//GtkToggleActionEntry *toggle_actions;
5454
int n_toggle_actions;
5555
const char *action_name;
5656
const char *ui_description;
@@ -59,7 +59,7 @@ typedef struct _LogClass {
5959

6060
GType log_get_type( void );
6161

62-
void log_clear_action_cb( GtkAction *action, Log *log );
62+
//void log_clear_action_cb( GtkAction *action, Log *log );
6363
void log_text( Log *log, const char *buf );
6464
void log_textf( Log *log, const char *fmt, ... )
6565
__attribute__((format(printf, 2, 3)));

src/main.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ extern gboolean main_option_verbose; /* Verbose output */
4545

4646
/* Styles for buttons etc.
4747
*/
48-
extern GtkStyle *default_style;
49-
extern GtkStyle *selected_style;
50-
extern GtkStyle *error_style;
51-
extern GtkStyle *ok_style;
52-
extern GtkStyle *tooltip_style;
53-
extern GtkStyle *leaf_style;
54-
extern GtkStyle *dirty_style;
48+
//extern GtkStyle *default_style;
49+
//extern GtkStyle *selected_style;
50+
//extern GtkStyle *error_style;
51+
//extern GtkStyle *ok_style;
52+
//extern GtkStyle *tooltip_style;
53+
//extern GtkStyle *leaf_style;
54+
//extern GtkStyle *dirty_style;
5555

5656
void main_quit_test( void );
5757
void main_reload( void );

0 commit comments

Comments
 (0)