#5586 NORM Update.: clippings from Paint are not recognized as images

Zarro Boogs per Child bugtracker at laptop.org
Mon Dec 24 09:09:44 EST 2007


#5586: clippings from Paint are not recognized as images
---------------------+------------------------------------------------------
  Reporter:  tomeu   |       Owner:  tomeu   
      Type:  defect  |      Status:  new     
  Priority:  normal  |   Milestone:  Update.1
 Component:  sugar   |     Version:          
Resolution:          |    Keywords:          
  Verified:  0       |    Blocking:          
 Blockedby:          |  
---------------------+------------------------------------------------------

Comment(by tomeu):

 Replying to [comment:1 jg]:
 > Can we fix this? Presumably this is a one or two line change in a table.

 We have a method that, from a list of mime types, chooses the "most
 significant" one. That type will be used for describing the clipping in
 the clipboard frame and is the format that will be saved to the journal.

 I wanted to put in that func enough logic as to "sanitize" all the
 clippings offered by activities. So activities can offer a variety of mime
 types, but at the same time we distinguish one of those formats so as to
 give a consistent experience to the user.

 Unfortunately, now I think that's the wrong approach, as if activities
 don't limit the mime types offered and, perhaps, hint Sugar about the
 format that is best suited, Sugar will always be one step behind
 activities.

 So, I see three things that we can do here:

  1. Paint should offer just PNG. Because it is both its native format and
 the standard for raster images in Sugar.

  2. When activities need to offer clippings in more than one format, we
 need the activity to give a hint about which format best describes the
 data in there. That hint could be a SUGAR_BEST_FORMAT which would have as
 value the mime type of that format.

  3. Change the choosing algorithm in sugar to take this case in account,
 taking the risk that this will break some other activity in the future.

 1 would be both simple and safe to do now. 2 is complex and should be done
 in the future if people think is the way to go, I know Marco has
 reservations about it. 3 is both hacky and dangerous.

 Just to further illustrate why I think Sugar won't be able to consistently
 choose the best format from the ones offered by activities, consider the
 case when an activity can provide both an image and a text representation
 of it.

 How can sugar decide which format represents better the original object?
 Is the image a renderization of the text or is the text as description of
 the image based on some property of the original object?

-- 
Ticket URL: <http://dev.laptop.org/ticket/5586#comment:2>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list