Re: images that play nicely with revision control?

2014-02-11 Thread Alan Chandler

On 11/02/14 01:04, Hendrik Boom wrote:

On Sun, 09 Feb 2014 10:47:11 -0600, Richard Owlett wrote:


Hendrik Boom wrote:

I'm looking for a file format for images that plays nicely with
revision control. Ideally I'd like to edit them while seeing what I'm
editing, whether it's a line drawing (like inkscape) or a pixel map.
[snip]

You didn't say much about your actual drawing mixture.

I'd probably be willing to adapt my drawing style to the technology that
works with my revision control.  The drawings I'm interested in are
development tools for for novels or computer programs.  One might be
block diagrams of the main components of a program and their
relationships.  Another might be a picture of the main character of a
story, or a map of the country, or the layout of a character's house.
These are working drawings than high art.  And they're not static.  Oh, I
don't mean they're animations... I mean that as the months go by, they
need to be changed, as my understanding of the things they represent
changes.
I that case I would recommend you look at latex and specifically 
\tikzpicture.  The NODE feature of \tikz allows you to get shapes from a 
shape library and then link them with arrows.


I have been using latex for a while as my documentation engine of 
choice, with the raw text markup going into the repository.


Take a look at this manual - it is organised so there is an introductory 
tutorial first, with more detailed references later.


http://mirrors.ctan.org/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf

I currently use sublime text 2 as my editor, and with the latex plugin a 
ctrl-B builds the document as a pdf almost instantenously.


I have also developed a house style hartley.cls (My one man 
consultancy is called Hartley Consultants) for my documents which I 
installed in ~/texmf/tex/latex/hartley.cls.  Now at the top of each 
document all I have to do is say


\documentclass{hartley}

and I get a standard format (article like) document

just to give a flavour of the picture drawing capability (unusable 
unless you include 
\usetikzlibrary{fit,positioning,decorations.pathmorphing} at the top 
of the whole document) - here is a picture of 3 computers (one outside 
the home, 2 inside) with a load of applications drawn inside each  There 
is a router, called superhub which links inside to out, and there is a 
wiggly line (see snake) separating inside and out.


The line
%\draw[help lines] (0,-7) grid(12,7);
is commented out (% represents rest of line is a comment) but I used as 
I was building up the drawing to provide a grid behind the picture so I 
could see where I was placing things.


\begin{figure}
\begin{tikzpicture} [font=\footnotesize,inner 
sep=0.1cm,rectangle,remember picture,node distance=0.1cm,

machine/.style={fill=blue!30,inner sep=0.2cm},
machinename/.style={font=\sffamily},
servicename/.style={font=\itshape,text width=1.5cm},
application/.style={draw,text width=2cm,text badly centered,rounded 
corners,fill=white},

panel/.style={rectangle,text width=2.5cm},
service/.style={rectangle,draw,thin,text badly centered,text 
width=1cm,fill=white},

point/.style=coordinate,
applicationstack/.style={draw,thick,text width=2.5cm,rounded 
corners,fill=white}]

%\draw[help lines] (0,-7) grid(12,7);
% avalon
\node[machinename] (avalon) at(3,7) {Avalon};
\node (avalonapps) [below=of avalon] {\tikz {
\node[application,text width=2.5cm] (web) {\tikz {
\node[servicename] (http) {http};
\node[application] (hc) [below=of http]{Hartley Consultants};
\node[application] (cf) [below=of hc] {Chandler Family};
\node[application] (multiple) [below=of cf] {Multiple Clients};
}};
\node[application] (httpsservices) [below right=0.2cm of 
web.north east] {\tikz {

\node[servicename](https) {https};
\node[application,text width=1.5cm](planner) [below= of 
https]{Planner};

}};
\node[application](chat)[below=of httpsservices] {Chat Server};
\node[application](mx) [below=of chat] {Mail Forwarding};
}};
% boundary and superhub
\node[point](leftside) at(0,0){};
\node[point](rightside) at (12,0){};
\node [application,text width= 2.7cm,fill=red!20] (superhub) at 
(4,0) {\tikz {

\node[servicename] (superh) {Super Hub};
\node[application] (firewall) [below=of superh] {Firewall};
\node (hubservices) [below=of firewall] {\tikz {
\node[service] (nat) {NAT};
\node[service] (dhcp) [below=of nat] {\sout{DHCP}};
\node[service] (fwd) [below right=of nat.north east] {Port 
Fwd};

}};
}};

\draw[decorate,decoration={snake,post length=2mm}]
(leftside) -- (superhub);
\draw[decorate,decoration={snake,post length=2mm}]
(rightside) -- (superhub);
\node[machinename,above left=of rightside]{External Internet};

Re: images that play nicely with revision control?

2014-02-11 Thread Alan Chandler


just to give a flavour of the picture drawing capability (unusable 
unless you include 
\usetikzlibrary{fit,positioning,decorations.pathmorphing} at the top 
of the whole document) - here is



I forgot - my hartley.cls file also uses tikz picture (I draw some 
coloured lines (actually rectangles) at the bottom of the page and there 
is an option to print a light DRAFT across the page diagonally - so you 
will also need to include


\usepackage{tikz}

to bring in the whole drawing package



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/52f9f42a.1040...@chandlerfamily.org.uk



Re: images that play nicely with revision control?

2014-02-11 Thread Alois Mahdal

On 2014-02-10 13:46, Darac Marjal wrote:


Diff'ing images would probably want to involve a viewer that can 
flick

between the two images (as one would do in astronomy) as well as,
perhaps, showing the difference in the 'code' (perhaps the only
difference is compression).


I use Beyond Compare for this and many other things like syncing FTPs,
comparing/merging trees, analyzing changes, migrating home folders...
Its image comparing mode is especially cool, try it out or see product
page[1].

  [1]: http://www.scootersoftware.com/moreinfo.php?zz=moreinfo_viewers

It's paid, but really worth the money, and has month evaluation period.

Thanks.
aL.

--
Alois Mahdal


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/1984a367a0260f4a7d4c061a8d93b...@zxcvb.cz



Re: images that play nicely with revision control?

2014-02-11 Thread Jonathan Dowland
On 11/02/2014 03:45, Hendrik Boom wrote:
 But maybe it stands to reason that anything in raster graphics that 
 satisfies my requirements would be bulky.

You are facing a similar problem to encoding attachments for email:
trying to squeeze 8-bits-per-byte data into a 7-bits-per-byte medium,
so some bloat is sadly unavoidable.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52fa2e20.7040...@debian.org



Re: images that play nicely with revision control?

2014-02-11 Thread Tixy
On Tue, 2014-02-11 at 13:55 +0100, Alois Mahdal wrote:
 On 2014-02-10 13:46, Darac Marjal wrote:
 
  Diff'ing images would probably want to involve a viewer that can 
  flick
  between the two images (as one would do in astronomy) as well as,
  perhaps, showing the difference in the 'code' (perhaps the only
  difference is compression).
 
 I use Beyond Compare for this and many other things like syncing FTPs,
 comparing/merging trees, analyzing changes, migrating home folders...

I can second the recommendation of Beyond Compare for all the above
uses. I consider it one of most essential tools I use and is the only
commercial closed-source software I've ever purchased. (Well, I've paid
the Microsoft tax when buying PC's but that wasn't really by choice.)

-- 
Tixy


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1392157847.3015.11.ca...@computer5.home



Re: images that play nicely with revision control?

2014-02-10 Thread Darac Marjal
On Sun, Feb 09, 2014 at 05:37:49PM +, Hendrik Boom wrote:
 On Sun, 09 Feb 2014 10:47:11 -0600, Richard Owlett wrote:
 
  Hendrik Boom wrote:
  I'm looking for a file format for images that plays nicely with
  revision control. Ideally I'd like to edit them while seeing what I'm
  editing, whether it's a line drawing (like inkscape) or a pixel map.
  [snip]
  
  You didn't say much about your actual drawing mixture. You might get
  some ideas by looking at details of *EARLY*
  versions of HPGL and PostScript.
  A couple of quick links from Google:
  http://en.wikipedia.org/wiki/HPGL
  https://www.swiftview.com/pclcorner/pclcorner1.htm
  
  I'm drawing on memories circa Win 3.1 and CPM-80 .
  HTH YMMV ;/
 
 AH!  The days before widespread revision control!
 
 HPGL looks like it would fit the bill, for line drawings, anyway. If I 
 could get an off-the-shelf editor to read it and write it, anyway. It 
 dose seem to be more like object code than source code, so to speak.
 
 It would work with revision control if I could put in newlines instead of 
 semicolons. Or modify the revision control system to accept semicolons 
 and treat them as it now handles newlines.  Really, it should be possible 
 for a revision control to understand file types and know what's special 
 about them.

I believe that *is* possible, but it's either not widely done or perhaps
it just needs the right configuration set. For example, the Tortoise*
front-ends on Windows (TortoiseGit, TortoiseSVN etc) can spot Microsoft
Word documents (due to their mime-type) and, rather than invoking the
usual diff program to show differences, will launch Word in a Document
Compare mode.

Diff'ing images would probably want to involve a viewer that can flick
between the two images (as one would do in astronomy) as well as,
perhaps, showing the difference in the 'code' (perhaps the only
difference is compression).

How you invoke per-mime-type diff programs will, of course, depend on
your VCS.



signature.asc
Description: Digital signature


Re: images that play nicely with revision control?

2014-02-10 Thread Jonathan Dowland
Others have mentioned SVG - which, if you can prevent it being
compressed, might fit the bill; also PNM for raster images. A more
recent but lesser-known is SNG - a text-based format isomorphic with
PNG.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140210145242.ga27...@bryant.redmars.org



Re: images that play nicely with revision control?

2014-02-10 Thread Hendrik Boom
On Sun, 09 Feb 2014 10:47:11 -0600, Richard Owlett wrote:

 Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with
 revision control. Ideally I'd like to edit them while seeing what I'm
 editing, whether it's a line drawing (like inkscape) or a pixel map.
 [snip]
 
 You didn't say much about your actual drawing mixture. 

I'd probably be willing to adapt my drawing style to the technology that 
works with my revision control.  The drawings I'm interested in are 
development tools for for novels or computer programs.  One might be 
block diagrams of the main components of a program and their 
relationships.  Another might be a picture of the main character of a 
story, or a map of the country, or the layout of a character's house.  
These are working drawings than high art.  And they're not static.  Oh, I 
don't mean they're animations... I mean that as the months go by, they 
need to be changed, as my understanding of the things they represent 
changes.

-- hendrik


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ldbsuo$9ks$1...@ger.gmane.org



Re: images that play nicely with revision control?

2014-02-10 Thread Mark Neyhart
On 02/09/2014 03:28 AM, Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with revision 
 control. Ideally I'd like to edit them while seeing what I'm editing, 
 whether it's a line drawing (like inkscape) or a pixel map.

The X PixMap (.xpm) format may work for you.  It is based upon C
source code.  I don't know which image editors support it directly,
but the convert program from the Imagemagick suite will read and write it.

Mark Neyhart


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52f98021.6060...@akleg.gov



Re: images that play nicely with revision control?

2014-02-10 Thread Hendrik Boom
On Mon, 10 Feb 2014 16:42:57 -0900, Mark Neyhart wrote:

 On 02/09/2014 03:28 AM, Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with
 revision control. Ideally I'd like to edit them while seeing what I'm
 editing, whether it's a line drawing (like inkscape) or a pixel map.
 
 The X PixMap (.xpm) format may work for you.  It is based upon C source
 code.  I don't know which image editors support it directly,
 but the convert program from the Imagemagick suite will read and write
 it.

It seems ... well, bulky.

But maybe it stands to reason that anything in raster graphics that 
satisfies my requirements would be bulky.

-- hendrik

 
 Mark Neyhart



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ldc6cc$9ks$2...@ger.gmane.org



images that play nicely with revision control?

2014-02-09 Thread Hendrik Boom
I'm looking for a file format for images that plays nicely with revision 
control. Ideally I'd like to edit them while seeing what I'm editing, 
whether it's a line drawing (like inkscape) or a pixel map.

And I'd like to keep the whole thing under revision control (like 
monotone, or git, or such.  Currently I use monotone).

But any kind of compressed file format is probably not going to cut it.  
Revision control seems to be designed for program text, with lots of 
newlines in stable places.

If all else fails, and I get desperate I could even store my images as 
programs in, say, Scheme or C or some such, and run the code to see the 
image.  But that would make editing difficult.  And in that case, I'd 
like recommendations to graphics libraries that can output to a variety 
of formats, such as onto the screen, into a jpeg file, to svg or html 
format, or some such.

I would definitely prefer not to write a whole new image editor from 
scratch.

-- hendrik


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ld7s9t$knr$1...@ger.gmane.org



Re: images that play nicely with revision control?

2014-02-09 Thread Henning Follmann
On Sun, Feb 09, 2014 at 12:28:45PM +, Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with revision 
 control. Ideally I'd like to edit them while seeing what I'm editing, 
 whether it's a line drawing (like inkscape) or a pixel map.
 

I think that doesn't exist. At least not for all kind of images.
SVG is basically an XML file. There you can at least compare the xml
content. But that however is also very tricky, you might need something
which converts it first into canonical xml and the compare/store it.
But that is only efficient for vector images. For bitmap images that
wouldn't work.

 And I'd like to keep the whole thing under revision control (like 
 monotone, or git, or such.  Currently I use monotone).
 
 But any kind of compressed file format is probably not going to cut it.  
 Revision control seems to be designed for program text, with lots of 
 newlines in stable places.
 
 If all else fails, and I get desperate I could even store my images as 
 programs in, say, Scheme or C or some such, and run the code to see the 
 image.  But that would make editing difficult.  And in that case, I'd 
 like recommendations to graphics libraries that can output to a variety 
 of formats, such as onto the screen, into a jpeg file, to svg or html 
 format, or some such.
 

That approach is close to what adobe does. They basically have a master
image. They store with that image every change. That is how Lightroom
handles changes. This of course can be very demanding on cpu/gpu. Because
everytime you load the picture you have to apply all the changes to the
master, render it and display it.


 I would definitely prefer not to write a whole new image editor from 
 scratch.


-H

-- 
Henning Follmann   | hfollm...@itcfollmann.com


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140209130756.gb11...@newton.itcfollmann.com



Re: images that play nicely with revision control?

2014-02-09 Thread Hendrik Boom
On Sun, 09 Feb 2014 08:07:57 -0500, Henning Follmann wrote:

 On Sun, Feb 09, 2014 at 12:28:45PM +, Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with
 revision control. Ideally I'd like to edit them while seeing what I'm
 editing, whether it's a line drawing (like inkscape) or a pixel map.
 
 
 I think that doesn't exist.

That's what I suspected.  But I asked in the hope that there was 
something I hadn't heard of yet.

 At least not for all kind of images.
 SVG is basically an XML file. There you can at least compare the xml
 content. But that however is also very tricky, you might need something
 which converts it first into canonical xml and the compare/store it.
 But that is only efficient for vector images. For bitmap images that
 wouldn't work.

And XML can be difficult to do revision-merging on, even if furnished 
with lots of newlines -- what the merge algorithm considers a perfectly 
acceptable merge may end up violating XML's large-scale bracket matching.
Which means the user gets to worry about how his picture is coded, in 
exasperating detail.  But with some restricted limited-nesting XML files 
it might be made to work.

But I can imagine bitmaps to be mergable, if not compressed, and if enouth 
newlines are inserted in standard places, such as between scan lines.
Still, better techniques ought to be possible.

 
 And I'd like to keep the whole thing under revision control (like
 monotone, or git, or such.  Currently I use monotone).
 
 But any kind of compressed file format is probably not going to cut it.
 Revision control seems to be designed for program text, with lots of
 newlines in stable places.
 
 If all else fails, and I get desperate I could even store my images as
 programs in, say, Scheme or C or some such, and run the code to see the
 image.  But that would make editing difficult.  And in that case, I'd
 like recommendations to graphics libraries that can output to a variety
 of formats, such as onto the screen, into a jpeg file, to svg or html
 format, or some such.
 
 
 That approach is close to what adobe does. They basically have a master
 image. They store with that image every change. That is how Lightroom
 handles changes. This of course can be very demanding on cpu/gpu.
 Because everytime you load the picture you have to apply all the changes
 to the master, render it and display it.

So the change could sconsist of adding a bunch of code into the existing 
file.  And theh reverse change would consist of deleting it.  Maybe non-
conflicting merging would even work.  But the proper test for conflicts 
would be whether the two changesets affected the same part of the image.

Unless someone comes up with something else, it looks like a topic for 
further research.

And about compression?  It may turn out that the space saved by not 
duplicating parts of an image  that didn't change may outweigh the space 
lost by not compressing.

-- hendrik

 
 
 I would definitely prefer not to write a whole new image editor from
 scratch.
 
 
 -H



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ld89eg$k27$1...@ger.gmane.org



Re: images that play nicely with revision control?

2014-02-09 Thread Richard Owlett

Hendrik Boom wrote:

I'm looking for a file format for images that plays nicely with revision
control. Ideally I'd like to edit them while seeing what I'm editing,
whether it's a line drawing (like inkscape) or a pixel map.
[snip]


You didn't say much about your actual drawing mixture.
You might get some ideas by looking at details of *EARLY* 
versions of HPGL and PostScript.

A couple of quick links from Google:
   http://en.wikipedia.org/wiki/HPGL
   https://www.swiftview.com/pclcorner/pclcorner1.htm

I'm drawing on memories circa Win 3.1 and CPM-80 .
HTH YMMV ;/



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/52f7b10f.7000...@cloud85.net



Re: images that play nicely with revision control?

2014-02-09 Thread Hendrik Boom
On Sun, 09 Feb 2014 10:47:11 -0600, Richard Owlett wrote:

 Hendrik Boom wrote:
 I'm looking for a file format for images that plays nicely with
 revision control. Ideally I'd like to edit them while seeing what I'm
 editing, whether it's a line drawing (like inkscape) or a pixel map.
 [snip]
 
 You didn't say much about your actual drawing mixture. You might get
 some ideas by looking at details of *EARLY*
 versions of HPGL and PostScript.
 A couple of quick links from Google:
 http://en.wikipedia.org/wiki/HPGL
 https://www.swiftview.com/pclcorner/pclcorner1.htm
 
 I'm drawing on memories circa Win 3.1 and CPM-80 .
 HTH YMMV ;/

AH!  The days before widespread revision control!

HPGL looks like it would fit the bill, for line drawings, anyway. If I 
could get an off-the-shelf editor to read it and write it, anyway. It 
dose seem to be more like object code than source code, so to speak.

It would work with revision control if I could put in newlines instead of 
semicolons. Or modify the revision control system to accept semicolons 
and treat them as it now handles newlines.  Really, it should be possible 
for a revision control to understand file types and know what's special 
about them.

One workaround is to write some code that transforms between a revision-
friendly HPGl and regular HPGL in both directions, to use the revision-
friendly HPGL as checked-in source code, and to turn an existing editor 
into one for this format by a shell command that converts back and 
forth ...

Come to think of it, this might work with a lot of the other graphics 
file formats.  As long as they don't contain arbitrary identifiers that 
change with every edit. I must investigate.

I've faced the same problem with word-processor file formats, actually.  
At the moment the solution seems to be systems like markdown and 
asciidoc.  But it's easier there because marked-up ASCII text is a lot 
closer to the format in which the final document is presented.  It's 
still text, after all.

There's opportunity for some low-level research here. 

-- hendrik




-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ld8edd$k27$2...@ger.gmane.org



Re: images that play nicely with revision control?

2014-02-09 Thread Karl E. Jorgensen
Hi

On Sun, Feb 09, 2014 at 08:07:57AM -0500, Henning Follmann wrote:
 On Sun, Feb 09, 2014 at 12:28:45PM +, Hendrik Boom wrote:
  I'm looking for a file format for images that plays nicely with revision 
  control. Ideally I'd like to edit them while seeing what I'm editing, 
  whether it's a line drawing (like inkscape) or a pixel map.
  
 
 I think that doesn't exist. At least not for all kind of images.
 SVG is basically an XML file. There you can at least compare the xml
 content. But that however is also very tricky, you might need something
 which converts it first into canonical xml and the compare/store it.
 But that is only efficient for vector images. For bitmap images that
 wouldn't work.

For bitmap images, you *could* resort to storing them in PBM format -
which happens to be pure text and easy to parse[1].  The netpbm package
contains tools for converting to/from a plethora of formats. And to do
basic command-line manipulation of images.

For viewing the image, the normal Gnome tools understand PBM -
e.g. eog will happily show them, and nautilus will show you
thumbnails.  Not sure about other file managers...

[1] http://en.wikipedia.org/wiki/Netpbm_format

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140209175855.GA30686@hawking