• 189 Posts
  • 256 Comments
Joined 2 年前
cake
Cake day: 2024年7月1日

help-circle
  • GIMP

    You deskew it in GIMP? Sure, you want automation, but…

    GIMP is for image processing not document manipulation. When loading a 4-page PDF, GIMP tries a hack of importing each page as a separate layer to a single image. To change pages, in principle that should be a matter of changing layers (page-up and page-down according to the menu, but it had no effect). GIMP automatically presented page-4, which is a bit odd. And I could not change layers.

    Luckily page 4 happened to be the page I needed to deskew. But the rotate tool has no mechanism to fix a line that underlines a line of text followed by a mechanism that rotates as needed to make the line horizontal. We must resort to grabbing and dragging until it looks right. Eyeballing that is much more prone to human error than drawing a straight line under a line of text on the page.

    When exporting the result as PDF, we can specify that each layer in the image become a page in the PDF output. And it seems to work though I did not get the impression that the page I deskewed remained in the A4 geometry that it started with because there was some kind of extra gap between the edges and the frame. Since GIMP is not designed for documents, it would not likely have a concept of A4 paper which would then need to be preserved.

    ImageMagick – perhaps

    The other tool I can think of would be ImageMagick. It’s also not meant for documents but it looks like there is potential for this to be a solution. I ran display $image_of_a_page, selected the rotate transformation, and was able to draw a straight line which then became the baseline for rotation. This may be the answer but I have to fiddle with it more. ImageMagick often fails the principle of least astonishment. E.g. if you feed it some 600dpi images and simply instruct it to montage them, the result is extremely blurry. Makes no sense. The fix is that users must determine the resolution of the input images, do the math, and then explicitly specify the expected output resolution in order to have non-lossy processing. It’s bizarre how ImageMagick arbitrarily picks a fixed default resolution regardless of the input unless a user micro-manages that. So I’m not sure what kind of side-effects ImageMagick might have in this case.

    Unpaper

    How is unpaper “The FOSS tool to deskew” when it “often” fails to do just that?

    Because it’s the only FOSS tool that even attempts to offer a deskewing function for documents (AFAIK). It seems to be the one (and only) tool for this. Everything else is hacks intended for loose images – with functionality called “rotate” because it has no expectation of textual content. (Note that PDF is not an image format, it’s actually just a container of images and other things which can be quite dicey when working with tools not made for PDF manipulation).

    The various --deskew-* options seem well explained to me.

    Glad to hear you understand it! So, here are my questions:

     -dn { left \| top \| right \| bottom },...; --deskew-scan-direction { left \| top \| right \| bottom },...
             Edges from which to scan for rotation. Each edge of a mask can be used to detect the mask's rotation. If multiple edges are specified,  the
             average value will be used, unless the statistical deviation exceeds --deskew-scan-deviation. Use left for scanning from the left edge, top
             for scanning from the top edge, right for scanning from the right edge, bottom for scanning from the bottom.  Multiple  directions  can  be
             separated by commas. (default: left,right)
    

    The opening sentence is ambiguous to readers (who don’t know how the algorithm works). What is the meaningful difference between scanning from the left and scanning from the right? Why would the scan direction make a difference? What is a mask in this context? A mask is generally used when you want to limit a function to operation within (or outside of) a specified area. But that would not seem to make sense here. Why would the default be left,right and not left,down,right,top, for example? Is top and bottom meant for landscape documents that are not rotated upright?

     -ds pixels; --deskew-scan-size pixels
             Size of virtual line for rotation detection. (default: 1500)
    

    What is the “virtual line”? I might guess that it is the width of a line of text, but I can only guess because it is not explained. What are the algorithmic consquences of this value being too long, or too short? When deskew fails to rotate a page, how would I determine what the virtual line size should be?

      -dd ratio; --deskew-scan-depth ratio
             Amount of dark pixels to accumulate until scanning is stopped, relative to scan-bar size. (default: 0.5)
    

    An accumulation is typically measured as a total quantity not a ratio. We can expect input docs to have an all-white left margin which has nearly zero dark pixels. So this dd ratio seems to be incomplete. We might expect there to be a certain concentration of dark pixels before we start counting the vector length. And likely a certain concentration to continue scanning, and a certain concentration to stop scanning, which I suppose would be the same as that of starting the scan. Without knowing what the scan bar size is, how can we determine what this value needs to be? And if we know the scan bar size, how is the ratio calculated? If it’s the qty of black pixels over the qty of whitespace starting from the left edge of the paper, I don’t suppose a ratio of 50% (the default) would generally be reached.

     -dv deviation; --deskew-scan-deviation deviation
             Maximum statistical deviation allowed among the results from detected edges. No rotation if exceeded. (default: 1.0)
    

    What is a “detected edge”? Is that a line of text or an edge of the paper? I can’t tell from the man page how many edges there might be as we don’t know how the algorithm works. If It scans with a --deskew-scan-range of 5° and a --deskew-scan-step of 0.1, this seems to imply that it scans 100 times to find a single edge. Or is it finding multiple candidate edges from the same starting point and counting each of those as an edge that would then be compared for this deviation? From there, it seems unclear how many starting points it would attempt. I see no parameter for the distance between each starting point. If each starting point yields an edge, are all the edges for the whole page being considered for this deviation value? Or is it a deviation of candidate edges for just one line of text? If it’s the latter, how many lines of text are being processed?

    apt search deskew returns ocrmypdf and pagetools, no idea if that all goes back to unpaper or not.

    No results on oldstable but maybe Trixie has more. I often use ocrmypdf after deskewing because I thought it could not deskew. But your finding prompted me to look at the man page for ocrmypdf which reveals a --deskew option. So I will have to experiment with that.



  • That’s something different. The PSP is separate and runs in parallel to (and independent of) the TPM. The two coexist because they serve different purposes. “As of 2025, a TPM is provided by nearly all PC and notebook manufacturers in their products.” So 12 years following the introduction of the PSP, the TPM is still in play.

    I thought the TPM was relatively innocuous for those not running oppressive software. But perhaps I should revisit this, considering this from wikipedia:

    “In 2015, Richard Stallman suggested replacing the term “trusted computing” with the term “treacherous computing” due to the danger that the computer can be made to systematically disobey its owner if the cryptographical keys are kept secret from them.”

    RMS specifically condemns TPM version 2.0. Not sure what version motherboards for the Trinity CPU use.

    I previously thought TPM had no remote relationships. But remote attestation is certainly an anti-feature if the hardware can talk to the cloud without the control of users on a FOSS platform. Is that the concern that you have? I need to get to the bottom of this. Unlike the PSP, the TPM is open source. So the TPM should be well understood. The fact that the PSP is closed-source is in itself a problem. Obviously PSP is something to avoid.









  • Only works if the phone is modern enough to have usb-c plus you must buy some hardware from Amazon (or pay much more, I suppose). Fuck that.

    If you have a FOSS router laying around, you can simply put it into wifi bridge mode which inverts the wi-fi so it’s used to connect to the uplink, while the ethernet ports serve up the cloud. No need for a phone.

    If you have a spare non-FOSS router w/USB and phone, the router may be able to usb-tether to the phone. E.g. a Fritzbox would likely work for that.


  • evenwichtOPtosdfpubnixCannot create new communities
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    19 天前

    The community is the first of its kind. There is nothing in the fedi with the same name, past or present.

    Nor would it matter if it did exist. The Lemmyverse db shows lots of communities with the same name across different instances.

    Try it. Create “lkjsdfcjai9frej09frfe4trj”, which is just some random string that would not exist anywhere. It gives “that community already exists”.

    (edit) I see that you have not created any groups since 2023.








  • Anything made in that period is inaccessible from our local instance,

    Why would it be? It makes no sense that age matters. I just arbitrarily searched for a community that was newly created on one instance from another instance, and it was found. I had to wait around 3 seconds because the check is done in realtime.

    E.g. !Google@thelemmy.club was created just 1 week ago. Yet it’s found in just a few seconds by other instances.




  • There are close to 3 people in the world that compose them the way you describe.

    Luckily anyone can join the club if they want their faxes to have over-achieving quality. There is no law against it.

    Also you have to have a fixed phone line

    Not at all:

    1. There are 3rd party fax services who can send it for you.
    2. Fax over VOIP works if you select the right algo and have reasonable latency.

    Side note: “fixed lines” are just an illusion. You can subscribe to a POTS line but unless you are in a quite primitive region it will just be a VOIP service that is hidden from you at the end of your street.

    Fax doesn’t work for the vast majority of people for multitude of reasons.

    There are only 2 credible obscure corner cases that yield a fax failure. Countless things break email. Email is broken as shit:

    The things that make fax unreliable
    The things that make e-mail unreliable
    • the recipient’s client tools decide incorrectly that the message is spam and stores the message where it will never be seen
    • the receiving mail server uses a DNSBL to…
      • block connections from the sender
      • …accept and blackhole messages from the sender (ref outlook)
      • …accept and deliver messages to a place that is never visited
    • the recipient’s mail service decides for any flawed reason that the message is spam and delivers it to a folder that will never be seen
    • the recipient uses a spamgourmet.com address and forgot to update the counter thus causing the message to be blackholed or the service provider of the protected address blocks the spamgourmet.com server specifically
    • recipient’s mail server may reject the message if the domain name appearing in the From: field does not correspond with the IP address of the transmitting server (e.g. MUA allows freetyping the From: field and sender uses a spamgourmet.com address)
    • the recipient uses a forwarding service like Namesilo, who refuses to forward messages from unrecognized senders because the forwarding service considers their own IP reputation more important than the actual delivery of a single message
    • the recipient’s mail server uses graylisting with unreasonable delay. Time-sensitive messages can miss the deadline or sending servers can give up before the time lapse.
    • recipient’s e-mail server blocks the attachment (and possibly the whole email) incorrectly flagging it as malware.
    • recipient’s e-mail address is unknown because a webmaster’s anti-spam effort…
      • …is to not publish any email addresses. Senders are forced to use a contact form that’s blocked by a sometimes broken CAPTCHA. And when the webform does work, PDF attachments are not possible.
      • …is to block e-mail address disclosure until a CAPTCHA is solved, and the CAPTCHA is broken or the sender rejects the effort required
      • …entails hiding e-mail addresses until some javascript renders them, but javascript is either unsupported or disabled by the visitor’s secure browser. There is also no indication to the visitor that an e-mail address is even available if j/s were to execute.
    • recipient’s e-mail address is unknown because the webpage publishing it blocks Tor and the visitor will be damned if they must give up their security to view the page
    • the sender simply cannot send the message because the corporation who handles the recipient’s email (e.g. is a PRISM corp like Google or Microsoft) is not sufficiently trustworthy for the content of the message
    • large corporations use DNSBLs to force email senders to relay their mail through a static IP, and the sender with dynamic IP may not consider any third party sufficiently trustworthy to see all their emails
    • sender boycotts the recipients e-mail provider
    • recipient does not have an S/MIME cert. or PGP public key, thus failing to achieve the level of confidentiality required by the sender (some sys admins even refuse to accommodate encrypted e-mail in fear that a malicious payload will get past the organizations malware scanner)
    • recipient uses an EU-based e-mail service provider, where law obligates collection of metadata (a collection that may jeopardize the level of confidentiality required by the sender), and the recipient or sender are not using a Memory Hole-capable MUA to protect their metadata
    • recipient abandons their mailbox because they have other accounts and can’t be bothered to manage all of them, and unread mail piles up
    • sender is a technologically-challenged bank or brokerage who sends multipart MIME messages and puts in the plaintext part:
      • a message saying “Upgrade your mail client” instead of the actual message
      • a large dump of unreadable machine-generated HTML indistinguishable from garbage
    • sender attaches a file in a non-standard proprietary format like MS Word and the recipient cannot view it (or does not trust it to open it for viewing).
    • the email service requires users to solve a CAPTCHA, which may be broken, might refuse to send the puzzle to certain IP addresses, or the puzzle might not be understandable. Protonmail is an example of an email service that pushes CAPTCHAs.


  • The guy got hit by massive spam calls,

    Obviously he did not know what he was doing. Foolish to expose a voice number to gratis 3rd-party fax services. If you do it right you get neither voice spam nor written spam. Sending email and sharing an email address is a good recipe for receiving spam.

    and wasted paper

    Fax does not require paper on either side of the transmission, so no need for waste.

    and toner (thankfully not ink or thermal) like crazy.

    Toner implies laser which wastes substantially more energy than inkjet. But of course the wisest fax recipients don’t bother with hard copies at all in the first place.

    I believe faxes do have some use cases even today, but they are rather fringe.

    That’s because privacy and data minimisation is fringe. Boycotting Microsoft and Google is also fringe.


  • Faxes are shit,

    Not if you know what you’re doing. Of course it’s shit if you feed a copy of a copy of a color doc into a scanner and send to a machine that thermo-prints hard copies from a roll of thin paper.

    If you compose in LaTeX using the Lucida Fax font, generate a group 3 fax TIFF and directly send that to a recipient competent enough to keep it electronic, the quality is so crisp the only clue that it’s a fax would be by someone with a meticulous recognition of that font, if not from a fax header.

    they are hard and rarely works

    You have to plug the machine in and power it on. Then it works. Of course email has the same prerequisite, and much more.

    For me, email rarely works. Google and Microsoft mail servers reject RFC-compliant mail from my mail server, so probably over 90% of email recipients are on a broken infra.

    and no one expects them anymore (nobody expected them even 10 years ago)

    True, as most people are not competent enough to realise fax avoids fussy and broken anti-spam algos, and that it minimises their exposure to tracking and surveillance when corresponding with an encryption-naive recipient.










  • Ah, so finally you have worked out how to articulate your struggle. And it turns out to be a misunderstanding on your part. Glad I did not blow time digging through my archives and citing sources.

    There is no need to prove that OEMs can’t have cameras w/out surveillance b/c I did not claim this. Bizarre idea. I only “need” to prove my own claims (and even then, only to the extent that I care to); certainly not whatever manifestation of a strawman this is that quietly emerged in your head.

    Cameras ARE surveillance. You can have both together. Or neither. Or you can have surveillance w/out cameras. But you cannot have functional cameras w/out surveillance. At best, to satisfy whatever academic masterbation you are attempting, you can have cameras and isolated surveillance which is not shared upstream with the mothership and you can even have that w/out on-the-fly facial recognition, theoretically. But such discussions are orthoganol to my claims.