Bug 356124 - Problem when start Skanlite and take a photo
Summary: Problem when start Skanlite and take a photo
Status: RESOLVED DUPLICATE of bug 370972
Alias: None
Product: libksane
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR critical
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-30 18:34 UTC by David
Modified: 2019-04-14 08:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: KDE Applications 18.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2015-11-30 18:34:02 UTC
I have Kubuntu 15.10 with Kubuntu-CI Stable's PPA.

I have a old pc (Lubuntu 14.04 LTS) with my scanner (HP ScanJet 3400C) (via USB).

I use the scanner from another pc with Kubuntu 15.10 with Skanlite (version 1.1, with KDE platform 4.14.13). So, I can use my scanner in my LAN without problems.

When I start Skanlite, there is an error ("No device found"), but with a click on "Refresh devices list" and the system found my scanner and I can continue.
When I take a photo (for example), I see a an image with a lot of blue, red, orange, white pixel.
it seems a strange error! No errors displayed!

In the URL you can see an example, it's the same photo. (the first photo with SimpleScan, the second photo with Skanlite): 
1. http://infodevelop.altervista.org/bug/image_SimpleScan.jpg
2. http://infodevelop.altervista.org/bug/image_Skanlite.jpeg

Reproducible: Always

Steps to Reproduce:
1. Start Skanlite with the firs error (no device found)
2. When I take a photo, I have a "strange image"

Actual Results:  
See "Details"

Expected Results:  
See "Details"

I have a notebook: eMachines E525:
Intel® Celeron 2.2 Ghz Processor
15.6" Screen
1GB RAM
160GB HDD
DVD Rewriter
Integrated Graphics.
Comment 1 Kåre Särs 2015-12-01 08:52:06 UTC
Thanks for the report!

Could it be that you have 16bit/color enabled?

I tried to check the specs of your scanner, but my quick check did not turn up if it supports 16bit colors... The image looks like a 16bit image to 8bit conversion that has chopped off the wrong end of the 16bit word...
Comment 2 David 2015-12-02 09:57:56 UTC
(In reply to Kåre Särs from comment #1)
> Thanks for the report!
> 
> Could it be that you have 16bit/color enabled?
> 
> I tried to check the specs of your scanner, but my quick check did not turn
> up if it supports 16bit colors... The image looks like a 16bit image to 8bit
> conversion that has chopped off the wrong end of the 16bit word...

The first time I used the scanner (via LAN), it worked very well: no problems, no errors and the image was great.
The next day, I took a photo but there was a lot of blue, green, red, orange pixels (like the second image I posted).

I don't know if my system is 16bit/color enable but Skanlite's configuration is standard (I change nothing).
Here you can found the specifications of my scanner (Bit Depth: 36-bit color): http://www.shopping.hp.com/shopping/pdf/c7722a.pdf

Thanks! :-)
Comment 3 Kåre Särs 2015-12-02 10:51:56 UTC
"Bit Depth: 36-bit color" means that the hardware has 12 bits per color and that probably means that the "driver/backend" can pad with 0 for 16bit/color or strip away the lower bits for 8bits/color

There should be a combobox option available that is called "bit depth" or "color depth"... setting this to 8bits should fix the problem.... if there is no such option could you run the following command in the terminal and make a scan with as low resolution as possible:

SANE_DEBUG_NIASH=255 skanlite

Then attach the output here.  You could experiment with different levels of debug by changing 255 to something lower like 128, 32, 16.... if there is faaar too much repeated lines ;)

The scanner specs say USB or parallelport so I guess you are running saned on the old machine to share the scanner... I know that there is a big/little-endianness problem when using saned and 16bit/color....

Hope this helps
Comment 4 Kåre Särs 2015-12-02 10:55:22 UTC
Hmm that command was for the local backend and not saned....

SANE_DEBUG_NET=16 skanlite

is for the network backend
Comment 5 David 2015-12-02 11:47:31 UTC
(In reply to Kåre Särs from comment #3)
> "Bit Depth: 36-bit color" means that the hardware has 12 bits per color and
> that probably means that the "driver/backend" can pad with 0 for 16bit/color
> or strip away the lower bits for 8bits/color
> 
Thanks! I don't understand what it means :-)

> There should be a combobox option available that is called "bit depth" or
> "color depth"... setting this to 8bits should fix the problem.... if there
Where do I found that option? Client-machine or server-machine?

> is no such option could you run the following command in the terminal and
> make a scan with as low resolution as possible:
> 
> SANE_DEBUG_NIASH=255 skanlite
You can find the command in Doc255.txt
 
> Then attach the output here.  You could experiment with different levels of
> debug by changing 255 to something lower like 128, 32, 16.... if there is
> faaar too much repeated lines ;)
> 
> The scanner specs say USB or parallelport so I guess you are running saned
> on the old machine to share the scanner... I know that there is a
> big/little-endianness problem when using saned and 16bit/color....
> 
> Hope this helps

You can found the command "SANE_DEBUG_NET=16 skanlite" in Doc16.txt

PS: "Helios" is the name of pc-server (with Lubuntu + Scanner), "Dolphin" is the name of pc-client (where I use Skanlite).

Thanks! :-)
Comment 6 David 2015-12-02 11:54:16 UTC
Sorry, I can't create the txt files (I use, for example: SANE_DEBUG_NET=16 skanlite > Doc16.txt).
I am studing a solution for that.
Comment 7 Kåre Särs 2015-12-02 12:06:08 UTC
Hi,

The option should be in Skanlite user interface (the first tab).

The output goes to stderr so ">" does not work.

Either use Konsoles "File->Save Output As..." or  pipe stderr to the file "....skanlite 2> Dock16.txt"
Comment 9 David 2015-12-02 12:48:27 UTC
Now I install Kolourpaint4 and see this: http://infodevelop.altervista.org/bug/programmi.png

When I installed Kubuntu, I found "Acquisizione di immagini" (without grey word "Skanlite"): this program is called "Acquisizone di Immagini" and his version 4.12.0 (I don''t know if it is a particular version of Skanlite). This program works very well, and there aren't errors (no red/blue/orange pixels, like image with SimpleScan).
You can see my screens: http://infodevelop.altervista.org/bug/acquisioneImmagini_NO_Skanlite.png 
(don't worry: it's Italian language! ;-))
PS: There isn't setting's button for example.

After the Kubuntu's installation, I installed Skanlite (from terminal: sudo apt-get install skanlite) but I don't know the reason (I do not know why , maybe I was too tired).
If I use Skanlite, I find the problems that I wrote.

PS: However Goofy is one of the best programs in KDE platform!
Comment 10 David 2015-12-02 12:52:01 UTC
Sorry!!! :'-(
Not Goofy (Goofy is a videogame of my brother) but SKANLITE is one of the best programs in KDE! :-))

Excuse me , but I'm too tired and I do a lot of mistakes when I write!
Comment 11 Kåre Särs 2015-12-03 07:10:32 UTC
Thanks :)

"Acquisizione di immagini" (without grey word "Skanlite"): is the ScanGui application that uses the same  library as Skanlite but is released with Kipiplugins. ScanGui does not save any parameters across restarts.
Could it be that you tried one of the options in the "Scanner specific options" tab?
Skanlite saves all changes to parameters on exit and sets them on next start. To revert all parameters to the default ones you can go to the Settings and click "Revert scanner options to default values". 

Does this help?
Comment 12 David 2015-12-03 09:40:37 UTC
Hi Kare Sars,
This afternoon I will try your solution (thanks very much!).

This morning I tried Kubuntu 14.04.03 from LiveCD (no installation).
In that release of Kubuntu, you can find only Skanlite. 
I tried Skanlite to take a photo and the result was excellent! No red/blue/orange pixels of image.

After I installed digiKam: in the KDE-menù->Graphics you can find Skanlite and AcquireImages (in Italian: "Acquisizioni di immagini").
So I tried to take a photo with Skanlite and the result was incorrect (the same problem I wrote at the beginning of this discussion).
Then I tried to take a photo with AcquireImages and the result was great (like Skanlite without digiKam).

Maybe it is a conflict between Skanlite and digiKam+AcquireImages.
Is it possible?

(Excuse me for my low-level English!)

Thanks for your help! Have a great day! :)
Comment 13 David 2015-12-07 15:26:12 UTC
Hi!
now I upgrade my system (Kubuntu 14.04 LTS) with the lates updates.
In my menu there is "Acquisizione di immagini" and Skanlite (I don't install "Acquisizione di immagini") and there is the same problem that I wrote at the beginning of the discussion.
I think is a problem between "Acquisione di immagini" and Skanlite.

Is there a solution?
Thanks! :)
Comment 14 Kåre Särs 2019-04-14 08:56:01 UTC
This bug should be fixed by commit:

https://commits.kde.org/libksane/ef39d6cfd6c97880061e6ebb32c9c611e372f920

And included in KDE applications release 18.12

I missed this bug report when the fix was made.

This one was first, but the fix-commit was done to the other so marking this as a duplicate to get the information here as well.

*** This bug has been marked as a duplicate of bug 370972 ***