<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for frob</title>
    <link>http://www.advogato.org/person/frob/</link>
    <description>Advogato blog for frob</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 4 Dec 2008 20:23:59 GMT</pubDate>
    <item>
      <pubDate>Sun, 8 Jul 2007 06:51:02 GMT</pubDate>
      <title>8 Jul 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=21</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=21</guid>
      <description>&lt;b&gt;pycairo snippet&lt;/b&gt;&lt;br&gt;&lt;br&gt;&#xD;
On the way to Visio VSD/VSS viewer I need some way to load&#xD;
images in different formats into cairo context.&lt;br&gt;&#xD;
&lt;a href="http://cworth.org/blog/" &gt;cworth&lt;/a&gt; pointed me to&#xD;
the right way to achieve it in C.&lt;br&gt;&#xD;
pyvsdump is in pythonese, so I made a small test and converted&#xD;
it to this 'snippet'.&lt;br&gt;&#xD;
It loads image file into memory (to emulate loading from&#xD;
parsed VSD) and after that display it.&lt;br&gt;&#xD;
Enjoy =)&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; &lt;a&#xD;
href="http://www.gnome.ru/devel_notes/cairo_load_image.py"&gt;[take&#xD;
a file]&lt;/a&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; -------------------------------------&#xD;
&lt;pre&gt;&#xD;
#!/usr/bin/env python&#xD;
import sys&#xD;
import gtk&#xD;
import cairo&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; def expose (da, event,pixbuf):&#xD;
    ctx = da.window.cairo_create()&#xD;
    ct = gtk.gdk.CairoContext(ctx)&#xD;
    ct.set_source_pixbuf(pixbuf,0,0)&#xD;
    ctx.paint()&#xD;
    ctx.stroke()&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; def main():&#xD;
    filename = sys.argv[1]&#xD;
    input = open(filename)&#xD;
    imagebuf = input.read()&#xD;
    pixbufloader = gtk.gdk.PixbufLoader()&#xD;
    pixbufloader.write(imagebuf)&#xD;
    pixbufloader.close()&#xD;
    pixbuf = pixbufloader.get_pixbuf()&#xD;
    imgw=pixbuf.get_width()&#xD;
    imgh=pixbuf.get_height()&#xD;
    win = gtk.Window()&#xD;
    win.connect('destroy', gtk.main_quit)&#xD;
    win.set_default_size(imgw, imgh)&#xD;
    da = gtk.DrawingArea()&#xD;
    win.add(da)&#xD;
    da.connect('expose_event', expose, pixbuf)&#xD;
    win.show_all()&#xD;
    gtk.main()&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; if __name__ == '__main__':&#xD;
    if len(sys.argv) != 2:&#xD;
        program = sys.argv[0]&#xD;
        print program +':', 'usage:', program,&#xD;
'&amp;lt;filename&amp;gt;'&#xD;
        sys.exit(0)&#xD;
    else:&#xD;
        main()&#xD;
&lt;/pre&gt;&#xD;
</description>
    </item>
    <item>
      <pubDate>Mon, 21 May 2007 06:47:25 GMT</pubDate>
      <title>21 May 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=20</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=20</guid>
      <description>&lt;b&gt;Import of CorelDraw (.cdr) files for linux.&lt;/b&gt;&lt;br&gt;&#xD;
Unstable but workable build of the &lt;a&#xD;
href="http://sk1.sourceforge.net"&gt;sK1&lt;/a&gt; available in &lt;a&#xD;
href="http://sk1.svn.sourceforge.net/viewvc/sk1/"&gt;SVN&lt;/a&gt;.&#xD;
&#xD;
&lt;p&gt; CDR files importer is included, so 'made with prepress in&#xD;
mind' files of version 7 to 13 /aka X3/&#xD;
can be opened in sK1 now.</description>
    </item>
    <item>
      <pubDate>Sat, 12 May 2007 04:20:12 GMT</pubDate>
      <title>12 May 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=19</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=19</guid>
      <description>&lt;b&gt;Opening CDR files in linux&lt;/b&gt;&lt;br&gt;&#xD;
Igor made a &lt;a&#xD;
href="http://www.libregraphicsmeeting.org/program.html"&gt;presentation&lt;/a&gt;&#xD;
of sK1 with CDR opening.&lt;br&gt;&#xD;
For demonstration purposes really complex map of the rare&#xD;
animals distribution in Ukraine was choosen.&lt;br&gt;&#xD;
Some &lt;a href="http://www.scribus.net" &gt;Scribus&lt;/a&gt; Team&#xD;
peoples  were interested, so I translated most of the format&#xD;
&lt;a&#xD;
href="http://www.linuxgraphics.ru/wiki/doku.php?id=kb-cdr-reverse"&gt;description&lt;/a&gt;&#xD;
into plain English.&#xD;
&#xD;
&lt;p&gt; RevEngeLog for the last days:&lt;br&gt;&#xD;
- &amp;lt;arrw&amp;gt; (arrow descriptions),&lt;br&gt;&#xD;
- &amp;lt;loda&amp;gt; type 0x14 (Polygones),&lt;br&gt;&#xD;
- &amp;lt;outl&amp;gt; dash descriptions,&lt;br&gt;&#xD;
- rounding corners for rectangles,&lt;br&gt;&#xD;
- how &amp;lt;loda&amp;gt; type 5 is linked to &amp;lt;bmp &amp;gt;,&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; I'm going to RE stars, spirals and other fancy tools in a day&#xD;
or two after testing files will be available.&#xD;
</description>
    </item>
    <item>
      <pubDate>Thu, 3 May 2007 06:25:34 GMT</pubDate>
      <title>3 May 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=18</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=18</guid>
      <description>&lt;b&gt;C0relDraw VS Visi0&lt;/b&gt;&lt;br&gt;&#xD;
The process of &lt;a href="http://sk1.sf.net" &gt;CDR file format&#xD;
reverse engineering&lt;/a&gt; seems to&#xD;
be more clear and quick than it was for VSD/VSS.&lt;br&gt;&#xD;
Possible reasons for that are:&lt;br&gt;&#xD;
- format of their containers&lt;br&gt;&#xD;
- LZW implementation in use&lt;br&gt;&#xD;
- 'object models'&lt;br&gt;&#xD;
- code for file format research&lt;br&gt;&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; CDR uses (slightly modified) RIFF with standard LZW. Also&#xD;
there are clearly&#xD;
identifiable pointers to 'document-wise' parts like&#xD;
fills and outlines parameters.&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; VSD uses OLE with 'customized' LZW version. There are a&#xD;
lot of&#xD;
entities there (I had ever asked native speakers to suggest&#xD;
some good names for different kind of 'peaces'). The&#xD;
relations mostly aren't clear.&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; A lot of time was wasted to find out LZW options (VSD).&#xD;
cdr_explorer (and therefore &lt;a&#xD;
href="http://sk1.sf.net"&gt;sK1&lt;/a&gt; importer) uses zlib&#xD;
functions (CDR).&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; RIFF leaves some place to guess about chunk content because&#xD;
of meaningful names (&amp;lt;obj &amp;gt;, &amp;lt;DISP&amp;gt;,&#xD;
&amp;lt;IKEY&amp;gt;, &amp;lt;bmp &amp;gt;, &amp;lt;fntd&amp;gt;&#xD;
can you guess what it is?).&lt;br&gt;&#xD;
In VSD _some_ parts of 'Visio Document Object Model' can be&#xD;
found from the 'type value in the pointer to stream', also&#xD;
one have to map chunk numbers to types.&lt;br&gt;&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; For vsd/vss I stole &lt;a&#xD;
href="ftp://ftp.gnome.ru/vsdump/"&gt;some code&lt;/a&gt; from &lt;a&#xD;
href="http://freshmeat.net/projects/libgsf"&gt;libgsf&lt;/a&gt;, but&#xD;
my ability to adapt it is quite restricted. And I gave up&#xD;
all attempts to make something useful in C with GObject.&lt;br&gt;&#xD;
For cdr Igor Novikov made &lt;a&#xD;
href="http://sk1.svn.sourceforge.net/viewvc/sk1/trunk/cdr_parser/src/cdr_explorer/"&gt;a&#xD;
cdr_explorer&lt;/a&gt;, that is really nice and handy.&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; So there are some details about the formats:&lt;br&gt;&#xD;
&lt;a&#xD;
href="http://www.gnome.ru/projects/docs/vsdocs.html"&gt;vsd&lt;/a&gt; &#xD;
and &lt;a&#xD;
href="http://www.linuxgraphics.ru/wiki/doku.php?id=kb-cdr-reverse"&gt;cdr&lt;/a&gt;&#xD;
(WARNING! Coarse (Russian) language. Viewer discretion is&#xD;
advised! =)&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; For now CDR files (ver.7 to ver. X3) can be opened in &lt;a&#xD;
href="http://sK1.sf.net"&gt;sK1&lt;/a&gt;. Igor Novikov is going to&#xD;
make two&#xD;
&lt;a&#xD;
href="http://create.freedesktop.org/wiki/index.php/Conference/Schedule#Schedule"&gt;presentations&lt;/a&gt;&#xD;
about it at &lt;a&#xD;
href="http://www.libregraphicsmeeting.org/"&gt;LGM-2&lt;/a&gt;&lt;br&gt;&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; &lt;b&gt;What could be my next target?&lt;/b&gt;&lt;br&gt;&#xD;
Well... there are some things to research in CDR ;-)&lt;br&gt;&#xD;
And show-stopper is not me (there are no more cdr files&#xD;
prepared to make meaningful conclusions.) Maybe or maybe not&#xD;
we will complete most of this job at LGM-2.&lt;br&gt;&lt;br&gt;&#xD;
&lt;a href="http://www.linuxgraphics.ru" &gt;Alexandre&#xD;
Prokoudine&lt;/a&gt; suggested that it could be interesting to dig&#xD;
into photoshop related formats.&lt;br&gt;&#xD;
&lt;a href="http://www.gnome.org/~jody/blog" &gt;Jody&lt;/a&gt; pointed&#xD;
to PPT.&lt;br&gt;&#xD;
So I'm encouraging Igor Novikov to extend cdr_explorer with&#xD;
support for OLE.&lt;br&gt;&#xD;
It will help us to finish with VSD/VSS (and maybe create&#xD;
some kind of viewer&lt;br&gt;&#xD;
for a time while &lt;a&#xD;
href="http://www.redferni.uklinux.net/visio/"&gt;Ian&#xD;
Redfern&lt;/a&gt; implement VSD-&amp;gt;..-&amp;gt;Dia convertor)&lt;br&gt; and&#xD;
provide a base for possible treatment of PPT.&lt;br&gt;&#xD;
I would rather work with PPT because I know &lt;a&#xD;
href="http://www.gnome.org/~jody/blog"&gt;who&lt;/a&gt; will be&#xD;
responsible for &lt;a&#xD;
href="http://ftp.gnome.org/pub/gnome/sources/present/0.0/"&gt;utilization&lt;/a&gt;&#xD;
of the collected data =).&lt;br&gt;&#xD;
And I believe that nobody really need any data about PSD&#xD;
format and related staff.  &#xD;
</description>
    </item>
    <item>
      <pubDate>Fri, 6 Apr 2007 16:29:38 GMT</pubDate>
      <title>6 Apr 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=17</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=17</guid>
      <description>&lt;b&gt;vsdump&lt;/b&gt;&lt;br&gt;&#xD;
&lt;a href="http://freshmeat.net/projects/vsdump/" &gt;vsdump&lt;/a&gt;&#xD;
team is double-sized.&#xD;
Max Kosmach makes some patches here and there,&lt;br&gt;&#xD;
he also forces me to make vsdump output more close to &lt;a&#xD;
href="http://www.redferni.uklinux.net/visio/vdx/"&gt;VDX&lt;/a&gt;.&lt;br&gt;&#xD;
&lt;br&gt;&#xD;
&lt;b&gt;svudump will be renamed&lt;/b&gt;&lt;br&gt;&#xD;
&lt;a href="sk1.sf.net" &gt;sK1&lt;/a&gt; team asked me to include&#xD;
svudump to their code.&lt;br&gt; After quick consultation with&#xD;
&lt;a href="http://www.advogato.org/person/svu/" &gt;svu&lt;/a&gt;, I  need to rename this code to&#xD;
something.&lt;br&gt;&#xD;
Igor Novikov (sK1) suggested a 'cdr_thumbnail'.&lt;br&gt;&#xD;
Accidently 'cdr' isn't only C0relDr@w file format, but also&#xD;
widely used for 'compact disk [recordable]'.&lt;br&gt;&#xD;
&lt;br&gt;&#xD;
&lt;b&gt;LGM-2007&lt;/b&gt;&lt;br&gt;&#xD;
I'm going to attend LGM2 in Montreal this May.</description>
    </item>
    <item>
      <pubDate>Wed, 21 Feb 2007 02:52:48 GMT</pubDate>
      <title>21 Feb 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=16</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=16</guid>
      <description>ELT started today. Thanks to JIAS and Jewish community.&#xD;
&#xD;
&lt;p&gt; It seems to be quite difficult to improve vsdump more w/o at&#xD;
least "indirect access through experienced user" to Visio2k2&#xD;
or 2k3. So I'm going to make some version of VSD/VSS viewer&#xD;
based on gtk+ or gnome.</description>
    </item>
    <item>
      <pubDate>Mon, 29 Jan 2007 07:50:57 GMT</pubDate>
      <title>29 Jan 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=15</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=15</guid>
      <description>&lt;b&gt;Stencils for Dia or Kivio&lt;/b&gt;&lt;br&gt;&#xD;
If you want to use some Visio stencil(s) under Dia or Kivio,&#xD;
you need to convert it.&lt;br&gt;&#xD;
For help with conversion of stencils of version 6 (visio2k&#xD;
and visio2k2) and 11 (visio2k3) you can use &lt;a&#xD;
href="http://freshmeat.net/projects/vsdump/"&gt;vsdump&lt;/a&gt;.&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; Most of 'commercial' stencils made of a set of WMF and/or&#xD;
EMF files.&lt;br&gt;&#xD;
While vsdump can't convert VSS directly to Dia or&#xD;
Kivio stencil, it can extract all those WMF/EMFs.&lt;br&gt;&#xD;
It's not quite easy to preview WMF/EMFs (e.g. EOG doesn't&#xD;
support this), so vsdump extracts an icons of&#xD;
'Masters' and saves them in .ICO files.&lt;br&gt;</description>
    </item>
    <item>
      <pubDate>Sun, 7 Jan 2007 17:37:39 GMT</pubDate>
      <title>7 Jan 2007</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=14</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=14</guid>
      <description>Slightly tired with VSD/VSS &lt;a&#xD;
href="http://freshmeat.net/projects/vsdump/"&gt;reverse&#xD;
engineering&lt;/a&gt;,&lt;br&gt;I made a &lt;a&#xD;
href="http://www.gnome.ru/projects/svudump_en.html"&gt;small&#xD;
utility&lt;/a&gt; to dump bitmap preview from CorelDraw files.&lt;br&gt;&#xD;
It's easy, so I would like somebody implement similar&#xD;
functionality in EOG or gthumb.</description>
    </item>
    <item>
      <pubDate>Sun, 24 Dec 2006 23:18:51 GMT</pubDate>
      <title>24 Dec 2006</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=13</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=13</guid>
      <description>Dear Lazy Web&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; One commercial software file format stores some raster&#xD;
images (icons) in the format described below:&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; Offset	Length	Value&lt;br&gt;&#xD;
2. . . . .  2. . . . . Width (always 0x20?)&lt;br&gt;&#xD;
4. . . . .  2. . . . . Height (always 0x20?)&lt;br&gt;&#xD;
8. . . . .  4. . . . . Size of file&lt;br&gt;&#xD;
0xE . . . . . . . . . start of transparency 'list'&lt;br&gt;&#xD;
[right after end of transperency] start of points colors&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; The start is in the left bottom corner.&lt;br&gt;&#xD;
Transparency: 1 bit per point&lt;br&gt;&#xD;
Points: 4 bits for color encoding&lt;br&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; It utilizes some kind of RLE algorithm, so if&lt;br&gt;&#xD;
most significant bit of L=1 -- repeat next byte L&amp;amp;127&#xD;
times	&lt;br&gt;&#xD;
most significant bit of L=0 -- read L&amp;amp;127 bytes&#xD;
'literally'.&lt;br&gt;&#xD;
----&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; May be you can recognize it as some well-known format?&lt;br&gt;&#xD;
&#xD;
&#xD;
&lt;p&gt; &lt;p&gt; Example:&lt;br&gt;&#xD;
00 00&lt;br&gt;&#xD;
20 00 (Width)&lt;br&gt;&#xD;
20 00 (Height)&lt;br&gt;&#xD;
16 00 00 00 (Size)&lt;br&gt;&#xD;
00 00 ???&lt;br&gt;&#xD;
02 c0 03 (2 most signif bits in the 1st byte and 2 least&#xD;
signif bits in the 2nd bytes are transparent)&lt;br&gt;&#xD;
FE 00 (next 7e*8 bits are opaque)&lt;br&gt;&#xD;
/because transparency was described for all points next&#xD;
bytes are colors/&lt;br&gt;&#xD;
08 FF 99 FF 99 99 FF 99 FF (2 white /in real transparent/, 2&#xD;
red /color 9/, 2 white, 2 red points; 2 red, 2 white, 2 red,&#xD;
2white /transparent again/ points)&lt;br&gt;&#xD;
FF AA (7f*2 green /color A/ points)&lt;br&gt;&#xD;
FF AA (7f*2 green /color A/ points)&lt;br&gt;&#xD;
FF AA (7f*2 green /color A/ points)&lt;br&gt;&#xD;
FB AA (7b*2 green /color A/ points)&lt;br&gt;&#xD;
end of file&#xD;
</description>
    </item>
    <item>
      <pubDate>Wed, 20 Dec 2006 01:27:27 GMT</pubDate>
      <title>20 Dec 2006</title>
      <link>http://www.advogato.org/person/frob/diary.html?start=12</link>
      <guid>http://www.advogato.org/person/frob/diary.html?start=12</guid>
      <description>&lt;b&gt;vsdump&lt;/b&gt;&lt;br&gt;&#xD;
I was wondered by the #inkscape ppl reaction on my question&#xD;
about Visio VSD/VSS files support.&lt;br&gt;&#xD;
It seems to be right not to bother them with info about CDR&#xD;
too...&#xD;
</description>
    </item>
  </channel>
</rss>
