GSoC 2008 UniConvertor and GraphicsMagick integration: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(New page: <pre> Rationale --------- Scribus is a serious DTP application and therefore has to deal with many different fileformats. While it already supports quite a few formats many others are stil...)
 
No edit summary
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<pre>
[[Category:GSOC]] [[Category:GSOC 2008]]{{Archive}}
Rationale
=Rationale=
---------
Scribus aims to be a professional level DTP application and therefore has to deal with many
Scribus is a serious DTP application and therefore has to deal with many
different file formats. While it already supports quite a few formats, some
different fileformats. While it already supports quite a few formats many
others are still not or incompletely supported. UniConvertor, which is
others are still lacking or incompletly supported. UniConverter which is
"a universal vector graphics translator"[1] can help for vector formats
"a universal vector graphics translator"[1] can help for vector formats
and GraphicsMagick which is a branch of the famous ImageMagick does the
and GraphicsMagick, which is a branch of the well-known ImageMagick, does the
same for raster formats[2].
same for bitmap formats[2].


Motivation
=Motivation=
----------
My motivation for doing this project is that I think it will be a huge benefit
My motivation for doing this project is that I think it will be a huge benefit
for Scribus and I like this kind of work (gluing two programms together). I did
for Scribus and I like this kind of work (gluing two programs together). I did
this last year with LaTeX and from the feedback I received it was a great
this last year with LaTeX and Scribus. From the feedback I received both from the users and developers, I think it is fair to say it was well received. This year I want to accomplish something similar and my aim is for results as  
success. So I want to do something similiar this year and hope it will be as  
good or, based on my previous experience, even better than the last time.
good or even better than last time.


Overview
=Overview=
--------
My plan to write an import filter for Scribus that uses UniConvertor and GraphicsMagick to read most of the formats supported by these programs.
I'll write an import/export filter that uses UniConverter and GraphicsMagick to
On IRC I was told that export with UniConvertor is "quite restricted", so
read and write all the formats supported by these programs.
I will add export filters only if they turn out to be useful.


Details
=Details=
-------


** UniConverter **
==UniConvertor==


* Previous experience
===Previous experience===
I've not worked with UniConverter before, so this information is based on
I've not worked with UniConvertor before, so this information is based on
a short research only and the implementation details are likely to change.
a short research only and the implementation details are likely to change. However, the Unicoverter developers are very cooperative with Scribus and other graphics application developers. It is very reasonable to expect that will continue or even improve over time with my project.


* Implementation
===Implementation===
The import plugin will either call UniConverter directly and get "raw" commands
The import plug-in will either call UniConvertor directly and get "raw" commands
to create the vector objects or it will use UniConverter to convert to an
to create the vector objects. The third option will use UniConvertor to convert to an
intermediate format such as SVG and then read this format.
intermediate format such as SVG and then read this format.
The same applies to the export filter, but here it might be possible that some  
The same applies to the (optional) export filter, but here it might be possible that some of the features supported by Scribus are not supported by the output format,
of the feature supported by Scribus are not supported by the output format and
so the user given an informative dialog explaining not all features are one for one transferable between each format.
so the user has to get a message.


* Existing work
===Existing work===
The SVG plugin can serve as a base for the new import plugin.
The SVG plugin can serve as a starting point for the new import plug-in.


* Userinterface
===User interface===
The list in File->Import gets pretty long, so it might be good to merge these
The list in File->Import would become quite long, so that it might be good to replace these
entries to a better interface, perhaps with autodetection of the fileformat and
entries with a single file dialog.
manual override.


==GraphicsMagick==


** GraphicsMagick **
===Previous experience===
 
I have used ImageMagick, the base of GraphicsMagick, a lot. I customized the
* Previous experience
I have used ImageMagick, the base of GraphicsMagick a lot. I customized the
bash script based dvd-menu-tool dvdwizard[3] at a time when it was less powerful
bash script based dvd-menu-tool dvdwizard[3] at a time when it was less powerful
than today. I had to rewrite a lot of the graphics code which relies on  
than today. I had to rewrite a lot of the graphics code which relies on  
ImageMagick.
ImageMagick.
I've also a bit of experience with imageframe loaders, because I came across
I also have a bit of experience with image frame loaders, because I learned about
this part of Scribus' code when working on my LaTeX frames project.
this part of the Scribus code when I was working on my LaTeX frames project.


* Implementation
===Implementation===
As GraphicsMagick deals with raster graphics an import filter for image frames
As GraphicsMagick deals with raster graphics, an import filter for image frames
is required here. With libgraphicsmagic++, a C++ library for the GraphicsMagick  
is required here. With libgraphicsmagic++, a C++ library for the GraphicsMagick  
functions, the integration should be pretty easy.
functions, the integration should be feasible.


* Existing work
===Existing work===
The QT image file loaders can serve as a base.
The Qt image file loaders can serve as a starting point.


* Userinterface
===User interface===
No new userinterface is required, but a way to show previews for the new
No new user interface is required, but a way to show previews for the new
filetypes has to be found.
file types has to be found.


** Other changes **
==Other changes==


* Build system
===Build system===
The build system has to be updated to look for UniConverter and GraphicsMagick.
The build system has to be updated to look for UniConvertor and GraphicsMagick.


Benefits to Scribus
=Benefits to Scribus=
-------------------
By using these libraries it is no longer necessary to write a new filter for
By using these libraries it is no longer necessary to write a new filter for
each new fileformat, but we can profit from the formats added to shared
each new file format, but we can benefit from the formats added to shared
libraries. For example Inkscape[4] also uses UniConverter starting with version
libraries. For example, Inkscape[4] also uses UniConvertor since version
0.46 [5]. So new fileformat should be usable faster.
0.46 [5]. As a result, new file formats and improvements added to the external libraries should be usable in Scribus faster.


Use cases
=Use cases=
---------
Importing all kinds of vector and raster formats.
Importing all kinds of vector and raster formats.


Deliverables
=Deliverables=
------------
* Import plug-in for UniConvertor
- Import plugin for UniConverter
* Export plug-in for UniConvertor (optional)
- Export plugin for UniConverter
* Import only plug-in for GraphicsMagick (or integrated into the main code)
- Import only plugin for GraphicsMagick (or integrated into the main code)
* A new import mechanism (file dialog) for vector files
- Better structured "File->Import" menu if found to be required
* Documentation
- Documentation


Timeline
=Timeline=
--------


* April 14: Accepted student proposals announced on the Google Summer of Code  
* April 14: Accepted student proposals announced on the Google Summer of Code home page. Community Bonding Period: Students get to know mentors, read documentation, get up to speed to begin working on their projects.
  home page. Community Bonding Period: Students get to know mentors,  
  read documentation, get up to speed to begin working on their projects.


I can start coding at this point, as I am already familiar with the scribus
''I can start coding at this point, as I am already familiar with the Scribus development process.''
development process.


* May 26: Students begin coding for their GSoC projects;
* May 26: Students begin coding for their GSoC projects;


At this point I should have read the required documentation and probably the  
''At this point I should have read the required documentation and probably the basic functionality for UniConvertor ready.''
basic functionality for UniConverter ready.


* July 7: Mentors and students can begin submitting mid-term evaluations.
* July 7: Mentors and students can begin submitting mid-term evaluations.


UniConverter should be fully working now and work on GraphicsMagick is started
''UniConvertor should be fully working now and work on GraphicsMagick is started or about to be started.''
or about to be started.


* July 20: End of semester
* July 20: End of semester


Around this time there will be some exams at university, so expect me to be
''Around this time there will be some exams at university, so expect me to be learning a bit more and coding a bit less. No exact dates are available yet.''
learing a bit more and coding a bit less. No exact dates are available yet.


* August 11: Suggested 'pencils down' date. Take a week to scrub code, write
* August 11: Suggested 'pencils down' date. Take a week to scrub code, write tests, improve documentation, etc.
  tests, improve documentation, etc.
    
    
  Now the GraphicsMagick part should be completed too. The time lost with the
''Now the GraphicsMagick part should be completed too. The time lost with the exams should be no problem, as this part of the work should take much less time and I'll also use the "Community Bonding Period" for coding.''
  exams should be no problem, as this part of the work should take much less
  time and I also spent the "Community Bonding Period" coding.
    
    
* August 18: Firm 'pencils down' date. Mentors, students and organization  
* August 18: Firm 'pencils down' date. Mentors, students and organization administrators can being submitting final evaluations to Google.
administrators can being submitting final evaluations to Google.




Links
=Links=
-----
* [1] http://sk1project.org/modules.php?name=Products&product=uniconvertor
[1] http://sk1project.org/modules.php?name=Products&product=uniconvertor
* [2] http://www.graphicsmagick.org/
[2] http://www.graphicsmagick.org/
* [3] http://dvdwizard.wershofen.net/
[3] http://dvdwizard.wershofen.net/
* [4] http://www.inkscape.org
[4] http://www.inkscape.org
* [5] http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046
[5] http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046
</pre>

Latest revision as of 18:06, 5 January 2011

Archive icon.png
This article is ARCHIVED. It is a part of the Scribus Community's history and is kept here for reference and as a representation of the contributed efforts. It is protected from editing, but its source can be copied.

Rationale

Scribus aims to be a professional level DTP application and therefore has to deal with many different file formats. While it already supports quite a few formats, some others are still not or incompletely supported. UniConvertor, which is "a universal vector graphics translator"[1] can help for vector formats and GraphicsMagick, which is a branch of the well-known ImageMagick, does the same for bitmap formats[2].

Motivation

My motivation for doing this project is that I think it will be a huge benefit for Scribus and I like this kind of work (gluing two programs together). I did this last year with LaTeX and Scribus. From the feedback I received both from the users and developers, I think it is fair to say it was well received. This year I want to accomplish something similar and my aim is for results as good or, based on my previous experience, even better than the last time.

Overview

My plan to write an import filter for Scribus that uses UniConvertor and GraphicsMagick to read most of the formats supported by these programs. On IRC I was told that export with UniConvertor is "quite restricted", so I will add export filters only if they turn out to be useful.

Details

UniConvertor

Previous experience

I've not worked with UniConvertor before, so this information is based on a short research only and the implementation details are likely to change. However, the Unicoverter developers are very cooperative with Scribus and other graphics application developers. It is very reasonable to expect that will continue or even improve over time with my project.

Implementation

The import plug-in will either call UniConvertor directly and get "raw" commands to create the vector objects. The third option will use UniConvertor to convert to an intermediate format such as SVG and then read this format. The same applies to the (optional) export filter, but here it might be possible that some of the features supported by Scribus are not supported by the output format, so the user given an informative dialog explaining not all features are one for one transferable between each format.

Existing work

The SVG plugin can serve as a starting point for the new import plug-in.

User interface

The list in File->Import would become quite long, so that it might be good to replace these entries with a single file dialog.

GraphicsMagick

Previous experience

I have used ImageMagick, the base of GraphicsMagick, a lot. I customized the bash script based dvd-menu-tool dvdwizard[3] at a time when it was less powerful than today. I had to rewrite a lot of the graphics code which relies on ImageMagick. I also have a bit of experience with image frame loaders, because I learned about this part of the Scribus code when I was working on my LaTeX frames project.

Implementation

As GraphicsMagick deals with raster graphics, an import filter for image frames is required here. With libgraphicsmagic++, a C++ library for the GraphicsMagick functions, the integration should be feasible.

Existing work

The Qt image file loaders can serve as a starting point.

User interface

No new user interface is required, but a way to show previews for the new file types has to be found.

Other changes

Build system

The build system has to be updated to look for UniConvertor and GraphicsMagick.

Benefits to Scribus

By using these libraries it is no longer necessary to write a new filter for each new file format, but we can benefit from the formats added to shared libraries. For example, Inkscape[4] also uses UniConvertor since version 0.46 [5]. As a result, new file formats and improvements added to the external libraries should be usable in Scribus faster.

Use cases

Importing all kinds of vector and raster formats.

Deliverables

  • Import plug-in for UniConvertor
  • Export plug-in for UniConvertor (optional)
  • Import only plug-in for GraphicsMagick (or integrated into the main code)
  • A new import mechanism (file dialog) for vector files
  • Documentation

Timeline

  • April 14: Accepted student proposals announced on the Google Summer of Code home page. Community Bonding Period: Students get to know mentors, read documentation, get up to speed to begin working on their projects.

I can start coding at this point, as I am already familiar with the Scribus development process.

  • May 26: Students begin coding for their GSoC projects;

At this point I should have read the required documentation and probably the basic functionality for UniConvertor ready.

  • July 7: Mentors and students can begin submitting mid-term evaluations.

UniConvertor should be fully working now and work on GraphicsMagick is started or about to be started.

  • July 20: End of semester

Around this time there will be some exams at university, so expect me to be learning a bit more and coding a bit less. No exact dates are available yet.

  • August 11: Suggested 'pencils down' date. Take a week to scrub code, write tests, improve documentation, etc.

Now the GraphicsMagick part should be completed too. The time lost with the exams should be no problem, as this part of the work should take much less time and I'll also use the "Community Bonding Period" for coding.

  • August 18: Firm 'pencils down' date. Mentors, students and organization administrators can being submitting final evaluations to Google.


Links