Opened 7 years ago
Closed 15 months ago
#13978 closed bug (fixed)
Quiet Icon-O-Matic vector point limit
Reported by: | kallisti5 | Owned by: | stippi |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Applications/Icon-O-Matic | Version: | R1/Development |
Keywords: | hvif | Cc: | |
Blocked By: | Blocking: | #8464, #12259, #18480 | |
Platform: | All |
Description (last modified by )
hvif has a limitation of 256 nodes per path, 256 paths, etc. Icon-O-Matic happily imports svg vectors outside of these constraints.
When saving an hvif, the extra data points are quietly dropped. This can result in lost work and a general feeling that Haiku/Icon-O-Matic is broken.
Since hvif is working as intended, lets try to provide the following feedback:
1) When importing an svg with more than 256 nodes per path, throw a warning dialog about limitations in the hvif format.
2) When exporting a vector as an hvif with more than 256 nodes per path, throw an error. "Paths with more than 256 nodes detected, path nodes will be truncated"
While Icon-O-Matic does support > 256 points, the end goal is generally to produce an hvif.
From a UX experience, placing a warning on import provides a better chance to catch these issues early and warn users to produce better svg graphics before they "work" on their final icons.
"Nobody likes to have to redo stuff"
Attachments (4)
Change History (18)
by , 7 years ago
Attachment: | Icon-O-Matic_vector_limit.png added |
---|
comment:1 by , 7 years ago
Side bar: I'm pretty sure what is described above is happening because I can "fix" the dropped points by re-adding some, and the same thing occurs again (dropping the points added)
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Keywords: | hvif added |
---|
Funny observation: Saving in the native Icon-O-Matic format results in:
- A document where the vector image loads correctly.
- The HVIF representation of the vector image in Tracker shows the skipped points.
So.. seems like an accidental or purposeful limitation of HVIF?
by , 7 years ago
Attachment: | HVIF-Native-Icon.png added |
---|
Tracker shows missing points in HVIF rendering of native Icon-O-Matic document, while Icon-O-Matic does not.
comment:4 by , 7 years ago
I don't remember all the details, but HVIF is definitely limited in the regards you observe. I am certain it supports 256 styles and 256 paths at most. Probably also 256 points per path, too, since it encodes the number of points that follow in a single byte. The limitation in points especially is a bit akward and feels unnecessary. Spending only one more byte per path would have upped the point limit to 65536... This can be fixed only by introducing a new version of HVIF. Other than that, I agree there should be a message informing of the problem.
That Tracker shows an icon with missing bits for a native icon file that still contains all information is not so suprising given that it shows is of course the separate icon from an attribute of the file which is in HVIF.
comment:5 by , 7 years ago
I think there are speed benefits to the 256 limitation, but the need for more than 256 points in a path seems like something that will follow us for a while.
I think you can automatically merge/reduce point counts in Inkscape (checking now, http://www.inkscapeforum.com/viewtopic.php?t=3995), so maybe a warning when importing an svg and a error when creating points > 256 is the best solution for now?
comment:6 by , 7 years ago
I would rather keep the limitation. If your icon is bitmap, just keep it as bitmap, it may even be smaller than a crappy png > svg > hvif conversion.
So yes, definitely warn about "you are doing it wrong" when this occurs. HVIF icons are supposed to be small so they fit in the "small attributes" section of the inode and can be loaded "for free" from disk. If you can't fit your icon there, you may as well use a bitmap directly.
comment:7 by , 7 years ago
Yeah, I was able to greatly reduce down the image by tracing the bitmap in Inkscape (and not using crappy online tools) and increasing the tolerances.
So, i'd say the solution to this one is warnings and user feedback in Icon-O-Matic. Right now the limitations quietly kick in resulting in broken hvif vectors and confused end users.
comment:8 by , 7 years ago
Description: | modified (diff) |
---|---|
Summary: | Icon-O-Matic vector point limit → Quier Icon-O-Matic vector point limit |
comment:9 by , 7 years ago
Summary: | Quier Icon-O-Matic vector point limit → Quiet Icon-O-Matic vector point limit |
---|
comment:10 by , 4 years ago
Blocking: | 12259 added |
---|
comment:11 by , 4 years ago
Added an error when exporting to HVIF in https://review.haiku-os.org/c/haiku/+/2852
That is still not very user friendly, but at least you'll know and not lose your work accidentally.
comment:12 by , 4 years ago
Blocking: | 8464 added |
---|
comment:13 by , 16 months ago
Blocking: | 18480 added |
---|
comment:14 by , 15 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in hrev57218 (new error messages.)
Screenshot of before and after save