bugMyPaint - Bugs: bug #9099, image border for drawing

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #9099: image border for drawing

Submitted by:  Martin Renold <martinxyz>
Submitted on:  Tue 08 May 2007 06:56:56 PM UTC  
Severity: 1 - WishPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: Jon Nordby <jonnor>Open/Closed: Closed
Release: Planned Release: None
Operating System: 

(Jump to the original submission Jump to the original submission)

Fri 04 Jan 2013 05:54:06 PM UTC, comment #21:

Already fixed in git, but closed with the release of MyPaint 1.1.0. Please reopen if this problem reoccurs with the new stable release!

Andrew Chadwick <achadwick>
Project Administrator
Sat 07 Apr 2012 12:53:46 PM UTC, comment #20:

In order to roundtrip a PNG file (e.g. for texturing) we would have to enable the frame automatically when loading PNG. This might be a bit confusing to users who don't know what it is or how to turn it off - it may destroy the "infinite canvas" feeling if you often have to turn the frame off? What do you think?

We could "fake-roundtrip" PNGs, maybe: remember the frame but don't display it. When saving, we do not crop if the frame is still turned off (that would be unexpected loss of information) but we can make sure that the image doesn't shrink: if there was a transparent border in the PNG, we can preserve it, but we expand the size as needed to save all pixels.

Martin Renold <martinxyz>
Project Administrator
Fri 18 Mar 2011 07:31:02 PM UTC, comment #19:

Thanks, pushed with minor changes to the commit message and UI strings: http://gitorious.org/mypaint/mypaint/commit/8de2b85d9e73a187d8570bdec95d9a6b580de186

I'm opening a new bug for the frame dialog improvements.

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Wed 16 Mar 2011 08:48:17 PM UTC, comment #18:

Attached a patch which adds two buttons for autocropping to the frame dialog.

"Ability to set frame size in cm/inches" would probably also require a DPI setting?

However, the frame dialog needs some love (after frame-presets have been added), which I might be able to provide ;)

(file #12669)

Till Hartmann <tillux>
Project Member
Thu 17 Feb 2011 08:35:51 PM UTC, comment #17:

I fixed the bugs mentioned and pushed the stuff to master now. Marking as fixed as the core feature is there. However, there as many things to be done still, as listed in comment 13.

Also, the following should be fixed before release:
- Saving/loading frame enabled/disabled state to the OpenRaster image

I have created a separate bug for the tile-alignment problem: https://gna.org/bugs/?17750

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Mon 14 Feb 2011 08:48:00 PM UTC, comment #16:

I would like the colorisation of the frames( and a border ) to have the best range of vizualisation choice for comfort while drawing.

More than colors and border settings, the direct list of profile I would like to do with can be more efficient and easy for other users. I selected the more usefull on the picture under :


(A) is the default one you coded ; good but in some usage case, to see the painting outside the picture can be distracting. The mid grey is the best choice for a one choice ; but I also would like just a border to sketch freely outside of my page as in (C) but with the feedback of the page size.
(B, D, ...C again? sorry a typo in my picture ; let say E ) are 3 solid background classical : Grey or Black as in Photoshop or Corel Painter, white as sometime propose Artrage or other natural media softwares ( on 100% white a thin border is required. )

David REVOY <deevad>
Project Member
Mon 14 Feb 2011 04:29:00 PM UTC, comment #15:

Thanks for quick testing and feedback.

Why would you want the frame color/opacity and other visual attributes configurable? The frame does not appear in the output image anyway, its only a visualization to communicate that the area outside the border is not "in the image".

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Mon 14 Feb 2011 04:13:15 PM UTC, comment #14:

As I just say on the IRC a minute ago : Good work.
This is totally a major evolution for Mypaint and I like it a lot.

Bugs I experienced :
- 'Height' and 'Width' are reversed in the 'frame'
- When I call 2 times the frame windows, the windows is empty. the terminal say this :
drawwindow.py:419: GtkWarning: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed
w.show_all() # might be for the first time

Features I would like ( if they are low-hanging-fruits ) :
- Preferences option : frame color / frame opacity
- (an later a frame border / frame border width / frame border color / frame border opacity )

David REVOY <deevad>
Project Member
Mon 14 Feb 2011 09:07:12 AM UTC, comment #13:

Pushed something minimally useful to my repository now, branch "frame": http://gitorious.org/~jonnor/mypaint/jonnors-clone/commits/frame

Please give feedback if there is anything that keeps this from going mainline.

Current status:
- User can enable/disable and set the size of the frame though dialog (under File)
- User can move the frame on-canvas by holding alt+space
- Saving/loading takes frame into account when enabled
- Resetting the view takes frame into account when enabled

Needs fixing:
- Frame must currently be tile aligned because PNG saving is tile aligned

Nice to have:
- Ability to set frame size in cm/inches
- Ability to save frame presets
- Ability to enable frame and a preset by default
- Action to autocrop to current layer bounding box
- Action to autocrop to current document bounding box

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Sat 25 Dec 2010 11:02:58 PM UTC, comment #12:

I've started working on this now. I'm starting with a very simple version targeting usecase 1) only, and then we can build on that.

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Sun 10 Oct 2010 08:34:42 PM UTC, comment #11:

Another usecase: Blender's "Projection Paint". For this the file size just needs to be preserved, during a png-->png roundtrip.


Martin Renold <martinxyz>
Project Administrator
Tue 01 Jun 2010 03:24:53 PM UTC, comment #10:

Duplicate: https://gna.org/bugs/index.php?16097

Martin Renold <martinxyz>
Project Administrator
Mon 10 May 2010 08:24:47 PM UTC, comment #9:

I want to add that usecase 2) is not about a final crop; painting will usually continue with the border visible. The border might be adjusted once or twice, and a fixed aspect ratio might be useful.

Usecase 1) is easier to implement, and what more users seem to be asking for.

(Usecase two is the only one I am personally interested in. My current workaround is, after a sketch "grows up", I go fullscreen and find a good viewport. Then I add details without scrolling. Sometimes I even take a screenshot just to save the current viewport.)

Martin Renold <martinxyz>
Project Administrator
Mon 10 May 2010 11:03:29 AM UTC, comment #8:

A little updated based on discussions between Martin and Jon in May, 2010.

There are two quite different usecases for this feature:
1) When the user wants to draw an image of certain size, and knows this before starting to paint.
This user likely wants to be able to set the size in cm/inches, and to be able to stored often used sizes as a preset, and be able to have such a preset used by default when starting a new image. It is OK for this usecase that the frame/border is set up in a not so interactive way.

2) When the user has painted a picture, and would like to view/export a certain region of the picture. This is essentially a cropping tool. It's usefulness will increase a lot if sizes and position can be changed in an interactive manner, preferably on canvas.

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Sat 11 Jul 2009 06:04:19 PM UTC, comment #7:

I have pushed some minimal concept work (cairo frame drawing only so far) into the branch "frame" on gitorious: http://gitorious.org/mypaint/mypaint/commits/frame

Martin Renold <martinxyz>
Project Administrator
Wed 08 Jul 2009 08:48:05 PM UTC, comment #6:

Another issue is the behaviour of the drawing with such a feature. In my opinion it doesnt make sense to limit the painting artificially to only within the border. As I see it, that would not add any benefits, only disadvantages. Specifically the data which you might have added outside the frame is lost. A bummer if you wanted to make the image bigger or anything like that.

For some workflows it might make sense to have the result outputted in a cropped fashion and/or with the layers "exploded". However this has little to do with drawing in itself, which is what MyPaint does. Therefore I propose to not include such facilities into the application itself, but rather to have them be stand-alone utilities.

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Wed 08 Jul 2009 08:19:31 PM UTC, comment #5:

One approach to implementing this might be to use layers. Have a special layer for this frame/border, not unlike the background we have today.
The UI for configuring it could also be grouped with that, either in the same dialog or on the same menu "Layers".

There has also been requests for makig MyPaint more practical for producing prints. This feature would help a lot in that regard, but even more so if the user is shown/can chose size in metric/imperial in addition to pixels. DPI would also have to be adjustable of course.

One could consider to also have presets like "A4", "A3", etc, but that is not so critical.

Jon Nordby <jonnor>
Project AdministratorIn charge of this item.
Wed 08 Jul 2009 08:09:35 PM UTC, comment #4:

It could be interesting, as I suppose OpenRaster & Cairo manage it, to have a zoomable/tranlsatable (and eventually rotatable) rectangle. to be able to place precisly the frame on the canvas for export.

Export could be in Openraster with all coords of picture at the same point or in multiple png to reimport it in video/3d/... animation software.

Pop O lon <popolon>
Sat 30 May 2009 08:36:23 AM UTC, comment #3:

Displaying of the frame is easy, and OpenRaster already has a method to save it.

See attached mockup. An idea is to stay in "frame dragging mode" as long as the text entries for the frame width/height are displayed. A single key would toggle those GUI elements (aka toolbox).

(file #5847)

Martin Renold <martinxyz>
Project Administrator
Mon 25 May 2009 07:32:29 PM UTC, comment #2:

see also this forum post:

Martin Renold <martinxyz>
Project Administrator
Thu 08 Jan 2009 08:19:48 PM UTC, comment #1:

No work on this has been commited to SVN; removing 0.6.0 target release.

Martin Renold <martinxyz>
Project Administrator
Tue 08 May 2007 06:56:56 PM UTC, original submission:

An infinite drawing canvas is not always good. It should be possible to draw on a "limited" rectangular canvas with a visible border.

This can be visual only, so drawing outside is just hidden. This is similar to a "crop" tool when saving the image as PNG.

Martin Renold <martinxyz>
Project Administrator


Attached Files
file #5847:  frame.png added by martinxyz (42kB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by tillux (Updated the item)
  • -unavailable- added by ania
  • -unavailable- added by deevad (Posted a comment)
  • -unavailable- added by jonnor (Posted a comment)
  • -unavailable- added by popolon (Posted a comment)
  • -unavailable- added by martinxyz (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 04 Jan 2013 05:54:06 PM UTCachadwickOpen/ClosedOpen=>Closed
    Wed 16 Mar 2011 08:48:17 PM UTCtilluxAttached File-=>Added 0001-Added-autocrop-options-to-the-frame-dialog.patch, #12669
    Wed 16 Mar 2011 11:48:09 AM UTCaniaCarbon-Copy-=>Added ania
    Thu 17 Feb 2011 08:36:00 PM UTCjonnorStatusReady For Test=>Fixed
    Mon 14 Feb 2011 09:07:12 AM UTCjonnorStatusIn Progress=>Ready For Test
    Sat 25 Dec 2010 11:02:58 PM UTCjonnorStatusWish=>In Progress
      Assigned toNone=>jonnor
    Sun 07 Feb 2010 01:15:14 PM UTCjonnorStatusNone=>Wish
    Sat 30 May 2009 08:36:23 AM UTCmartinxyzAttached File-=>Added frame.png, #5847
    Thu 08 Jan 2009 08:19:48 PM UTCmartinxyzPlanned Release0.6.0=>None
    Fri 28 Nov 2008 06:35:38 PM UTCmartinxyzPlanned ReleaseNone=>0.6.0
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup