Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
Hi, I do not have any insight into the SANE architecture, but here are my thoughts for version 2 of SANE: I like the idea of using a middleware. Another approach could be to leave the lineart api at the backends, but replace the lineart emulation code in each backend by linking to a general library. In both cases, additional parameters such as threshold could be helpful. Some backends may have just copy/pasted the conversion code from each other and some may have there own code. so the general library should be parameterizable to emulate best the backends original behavior for maximum compatibility to the scan results, users are used to get. So let SANE version 1 as is and maintain it in parallel. Bug fixes and new functionality state should be reflected in same minor version number, i.e. 1.0.31 should have the same functionality as 2.0.31. -Ulf Am 27.09.20 um 09:07 schrieb Olaf Meeuwissen: Same here. Let the backend focus on getting images from the scanner that are as close as possible given the device's protocol constraints and limitations. It can be hard enough already to get that working reliably according to the SANE API specification without having to deal with all kinds of software emulation. Software emulation can be added on top of that via middleware (SANE calls this a virtual backend). One place that might be suitable is the dll backend, however, things may be difficult to get right due to the fact that backends have so much leeway in naming their options. # Even the additional well-known options in the comatose version 2 draft # of the SANE Standard don't cut it. [...] However, I guess I would make some observations: 1) We could push the lineart conversion out of the backend, but there is no middleware in which to implement it. The frontend would have to offer that or leave it to the user to add it to their workflow outside of the scan operation. 2) If we remove it from a backend, then users consider that a regression, and that's fair. So I think that we are stuck with it. 3) I really dig the idea of having a sanei library of common operations. We do have some copy/pasted conversions sprayed around the backends and it would be great to get that code extracted out into something common, thus reducing the code footprint of the backend. As ever, regression testing is the issue for backends that are not well supported/maintained. # Radical idea: leave unmaintained backends just that, unmaintained. We # might even disable their build by default so they stop holding hostage # any of the progress we might consider if it weren't for mortal fear of # introducing regressions. # # In terms of semantic versioning, we could split off a 1.x branch where # all the unmaintained backends remain and remove them from master for a # sane-backends-2.0.0. Note, the version here is for the source tarball # and has *nothing* to do with SANE backend API versions and even less # with the SANE Standard version. Hope this helps, -- Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Softwarehttps://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
Hi, On Thu, Sep 24, 2020 at 5:03 AM m. allan noah wrote: > > I wrote sanei_magic to provide software deskew and > cropping algorithms to all backends, for just this reason. I've got a > pretty good lineart function in the epjitsu backend, that I could move > up to sanei_magic if other backends wanted to use it. > > Further to what I previously commented on, I wonder if there would be room in sanei_magic to include common algorithms for calibration and shading computation. All the backends seem to craft their own code to handle this type of operation. I'm no expert in this area so I really wouldn't know how practical that would be. Cheers, Ralph
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
I'm going to present a few sides here, mainly as a user, so here's a long mail. Also, I'm going to define a few terms. * A "sketch" is just pencil on paper. Greyscale, essentially. (Colored pencils are a different matter) * A "lineart" or "inked piece" is ink on paper, with the pencils erased as much as possible. Intended to be black & white. * "Inking" just means applying ink to a sketch and removing the pencils afterwards. * "Flats" means lineart that's been colored, mainly using Gimp's flood fill tool. * "Shaded" means flats that had 3D-ish touches added to indicate depth. Some of this is "cell shaded" (cartoony) or "full shaded". Before I got a Wacom Cintiq, I would ink my sketches that would be then colored and shaded in Gimp. This meant scanning the picture in as lineart... and because of the type of paper (Canson "Sketch"), it would scan in with a fair bit of noise to make the lineart scanned at 50% look a bit dirty -- I had to post-process it in Gimp. Now, afterwards, I'm scanning in color and inking them in Gimp. That said, it's probably a good idea to have a layer where some basic filters (threshold/B for lineart) can be applied before it's sent up to the client. This can probably provide some functionality to those scanners that don't support in-hardware B scanning (and by extension, greyscale). I would make sure the ability to disable filtering is provided, as some of us will want to control everything in Gimp (et al). On Thu, Sep 24, 2020 at 8:09 AM csol...@gmail.com wrote: > > 2020. 09. 24. 12:04 keltezéssel, Wolfram Sang írta: > > Well, I assumed the answer is 'no'. If it was 'yes', then the proper > path would be to first code it, convert the users, and only finally > delete the now obsolete stuff, no? > > Dear Sirs! > > I read the letters, looked at the suggested links, well ... > > I am a "simple" user who has used the lineart setting on the scanner for > many, many years. Now I was faced with the fact that it was discontinued by > default and is missing in my work ... > You are a scanner and IT pros and it was great to revive the sane backend > that has been dead for several years! > Isn't there an alternative to restoring black and white (linear) scanning? > I care about all solutions :) > > Sorry for the longer comment ... -- Kelly "STrRedWolf" Price http://redwolf.ws
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
> Sorry everyone! > I am ashamed of my inattention! No worries! :) signature.asc Description: PGP signature
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
> I am a "simple" user who > has used the lineart setting on the scanner for many, many > years. Now I was faced with the fact that it was discontinued > by default and is missing in my work ... > You are a scanner and IT pros and it was great to revive the > sane backend that has been dead for several years! > Isn't there an alternative to restoring black and white > (linear) scanning? Would you be so kind and do not write HTML emails for this mailing list? That would help some of us reading your emails. Well, I am not a maintainer but technically it is possible to simply revert the commit and re-enable lineart in this driver until the replacement is available. signature.asc Description: PGP signature
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
2020. 09. 24. 12:04 keltezéssel, Wolfram Sang írta: Well, I assumed the answer is 'no'. If it was 'yes', then the proper path would be to first code it, convert the users, and only finally delete the now obsolete stuff, no? Dear Sirs! I read the letters, looked at the suggested links, well ... I am a "simple" user who has used the lineart setting on the scanner for many, many years. Now I was faced with the fact that it was discontinued by default and is missing in my work ... You are a scanner and IT pros and it was great to revive the sane backend that has been dead for several years! Isn't there an alternative to restoring black and white (linear) scanning? I care about all solutions :) Sorry for the longer comment ... signature.asc Description: OpenPGP digital signature
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
On Thu, Sep 24, 2020 at 6:04 AM Wolfram Sang wrote: > > On Thu, Sep 24, 2020 at 11:59:39AM +0200, Ulf Zibis wrote: > > > > Am 24.09.20 um 11:45 schrieb Wolfram Sang: > > > > > > !458 explains some more: "The LINEART support within the backend is > > > implemented as a pure software filter. I think this should live in a > > > higher level and be reusable by all backends instead of being duplicated > > > within each backend." > > > > I agree, that having a gray->lineart filter in each backend is nonsense, > > but is there a possibility for such a filter in a intermediate layer? > > Well, I assumed the answer is 'no'. If it was 'yes', then the proper > path would be to first code it, convert the users, and only finally > delete the now obsolete stuff, no? > Agreed. Removing code that your users have come to rely on, without providing a replacement is bad form. In this case, this is a sort of expected feature for most scanners. I think it should not be provided by another layer, instead it could be a shared library that all backends can use. I wrote sanei_magic to provide software deskew and cropping algorithms to all backends, for just this reason. I've got a pretty good lineart function in the epjitsu backend, that I could move up to sanei_magic if other backends wanted to use it. allan -- "well, I stand up next to a mountain- and I chop it down with the edge of my hand"
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
On Thu, Sep 24, 2020 at 11:59:39AM +0200, Ulf Zibis wrote: > > Am 24.09.20 um 11:45 schrieb Wolfram Sang: > > > > !458 explains some more: "The LINEART support within the backend is > > implemented as a pure software filter. I think this should live in a > > higher level and be reusable by all backends instead of being duplicated > > within each backend." > > I agree, that having a gray->lineart filter in each backend is nonsense, but > is there a possibility for such a filter in a intermediate layer? Well, I assumed the answer is 'no'. If it was 'yes', then the proper path would be to first code it, convert the users, and only finally delete the now obsolete stuff, no? signature.asc Description: PGP signature
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
Am 24.09.20 um 11:45 schrieb Wolfram Sang: !458 explains some more: "The LINEART support within the backend is implemented as a pure software filter. I think this should live in a higher level and be reusable by all backends instead of being duplicated within each backend." I agree, that having a gray->lineart filter in each backend is nonsense, but is there a possibility for such a filter in a intermediate layer? -Ulf
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
> > Why is the lineart option not supported in the sane 1.0.31 backend version? > > Probably because of commit a12083c8c44b7296fa98ecb83e8932d0f6bdeb05. > > > https://gitlab.com/sane-project/backends/-/commit/a12083c8c44b7296fa98ecb83e8932d0f6bdeb05 > > @povilas> The commit message doesn't really explain why though ... !458 explains some more: "The LINEART support within the backend is implemented as a pure software filter. I think this should live in a higher level and be reusable by all backends instead of being duplicated within each backend." I am not sure, though, if higher level means GIMP et al. here? signature.asc Description: PGP signature
Re: [sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
Hi csola48, csol...@gmail.com writes: > Why is the lineart option not supported in the sane 1.0.31 backend version? Probably because of commit a12083c8c44b7296fa98ecb83e8932d0f6bdeb05. https://gitlab.com/sane-project/backends/-/commit/a12083c8c44b7296fa98ecb83e8932d0f6bdeb05 @povilas> The commit message doesn't really explain why though ... > Typed texts, black and white forms can only be scanned with a gray background! > > (Ubuntu 18.04.5 / Canon LIDE 220) > > csola48 Hope this helps, -- Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Softwarehttps://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join
[sane-devel] sane 1.0.31 backend version not supported lineart. Why?...
Why is the lineart option not supported in the sane 1.0.31 backend version? Typed texts, black and white forms can only be scanned with a gray background! (Ubuntu 18.04.5 / Canon LIDE 220) csola48