Re: [Inkscape-devel] Bitmap handling (GSoC)

On 7/18/07, Bryce Harrington <bryce@...961...> wrote:
On Wed, Jul 18, 2007 at 10:33:00AM -0700, Ted Gould wrote:
Hello all,
As you guys are aware Chris is working on putting some bitmap editing tools into Inkscape for is GSoC project. There's a couple things that are difficult on the user interaction front that I wanted to bring up and see what people think.
Basically, there are two types of images: embedded and linked. There is two types of linked images that are read-only and ones that we can write. So what should happen when someone does a bitmap operation on these types of image? How should undo/redo be handled?
I'm leaning towards saying "always embed" at this point. It's simpler and probably does something similar to what most people want anyway. We don't need file dialogs or temporary files. What does everyone think about this? Chris, did I state the problem correctly?
Hi Chris,
Can you tell us more about your plans with this feature, and how embedding vs. linked will make things more challenging or less? Sounds like most people prefer embedded - does this lead us into any issues on your end we should know about?
Bryce
Embedding all images would certainly make it much simpler and easier. I don't know about speed issues -- but intuition tells me that having a 10 mb file would load more slowly than a 100 kb svg file and five 2 mb images. But that's a matter for someone who's put more time into Inkscape's rendering functions to answer.
If I inserted an image and executed some special effect on it, and then found out my program had converted my image into base64 and embedded it into my svg document, without asking me, I wouldn't be too I happy, personally. I don't want to make that the only option, and I'd actually rather not have it default.
My next goal is to be able to undo operations on linked images. If that isn't extraordinarily hard (and I don't expect it to be, I just have to get into the undo buffer, I guess), I don't see any reason why keeping images linked would be a bad idea.
-Christopher

Embedding all images would certainly make it much simpler and easier. I don't know about speed issues -- but intuition tells me that having a 10 mb file would load more slowly than a 100 kb svg file and five 2 mb images. But that's a matter for someone who's put more time into Inkscape's rendering functions to answer.
If I inserted an image and executed some special effect on it, and then found out my program had converted my image into base64 and embedded it into my svg document, without asking me, I wouldn't be too I happy, personally. I don't want to make that the only option, and I'd actually rather not have it default.
My next goal is to be able to undo operations on linked images. If that isn't extraordinarily hard (and I don't expect it to be, I just have to get into the undo buffer, I guess), I don't see any reason why keeping images linked would be a bad idea.
-Christopher
Hi, If linking bitmaps sounds great in terms of file opening speed, the problem is then how hard handling jobs will be.
A job (let's say an advertising flyer for example) would then be a bunch of bitmaps around an SVG.
That would make Inkscape similar to page layouting software like Indesign, Quark or Scribus where the jobs are presented on the disk as a file structure: the main file (containing text and some vectors) and lots of linked files (bitmaps, PDF, EPS or whatever...). It is very hard to manage and distribute those kind of jobs because you always need to keep the same file position relative to the main file. If a linked bitmap moves to another position on the disk, it is then considered as a broken link that needs to be updated. So in that case Inkscape would need a linked bitmap manager.
As a graphic designer I'd rather see inkscape dealing with files in the same way as Corel Draw does: by default, imported bitmaps (and certain other file formats) are embedded in the main CDR file (embedding is default for drag-and-dropped files). But when importing a file through the "Import File" dialog, the user have the choice to link the imported file externally (very useful when working with huge size bitmaps with high resolution). This can be achieved by selecting a special checkbox that appears when the selected file can be linked externally (not all the files can be linked though).
In Inkscape it would be very nice to have the possibility to switch the default behaviour between "embed bitmaps by default" and "link bitmaps by default". The selected behaviour will then apply to drag-and-drop bitmaps, and in the "Import File" dialog window the "Link Bitmap" checkbox will be unselected or selected depending on the chosen default behaviour.
About the operations on bitmaps: I see no reason to provide the possibility to transform linked bitmaps. Linked bitmaps can be not only PNGs but TIFF, JPGs and all the other formats Inkscape can now import. That means that if I import a linked TIFF file and then make changes on it inside Inkscape, it should logically write the TIFF file back on the disk (and it can't do it for now), or replace the link to a PNG file (which is the only format that it can create for now) that will be placed at the same position on the disk beside the original TIFF. It's not very good for the workflow because every altered linked bitmap (other than PNG) means a new PNG file on the disk and a replaced link in the SVG.
So logically, bitmap operations should be available only for embedded bitmaps.
Just my 2 cents. :)
Molumen
participants (2)
-
Christopher Brown
-
momo