bugGNU roff - Bugs: bug #66707, some versions of pnmcrop produce...

 
 

bug #66707: some versions of pnmcrop produce spurious warnings

Submitter:  Dave <barx>
Submitted:  Fri 24 Jan 2025 06:45:41 PM UTC
   
 
Category:  General Severity:  2 - Minor
Item Group:  Warning/Suspicious behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sat 27 Sep 2025 03:52:16 PM UTC, comment #1: 

original submission:

> So, if the pnmcrop calls turn out to not be altogether redundant,


This remains unanswered (AFAIK); however:

> I suggest documenting the warning in the PROBLEMS file


This has been done in commit de6d3118a.

Dave <barx>
Group Member
Fri 24 Jan 2025 06:45:41 PM UTC, original submission:  

Bug #61302 reports that users with some versions of pnmcrop see diagnostics saying "The image is entirely background; there is nothing to crop" when building doc/pic.html.  I also see it when building doc/webpage.html.

Deri researched this and concluded "I believe what is happening is that the pnmcut (which precedes the pnmcrop), has actually removed all the white pixels outside the figure, so pnmcrop has nothing to do."  Branden further noted: "It appears that some versions of pnmcrop ignore the command's `-quiet` flag."  In particular, Deri sees this with Netpbm 10.87.1, and I see it with Netpbm 10.70.0.

But, funny thing: my pnmcrop recognizes -quiet but does not document this.

$ pnmcrop -quiet /etc/motd
pnmcrop: bad magic number 0xa46 - not a PPM, PGM, PBM, or PAM file
$ pnmcrop -silent /etc/motd
unrecognized option '-silent'.  Recognized options are: -black -white -sides -left -right -top -bottom -verbose -margin -borderfile

The man page similarly omits mention of -quiet.  So while the command doesn't reject this option outright as it does other unrecognized options, the fact that it's undocumented (and, incidentally, does nothing) makes it seem like it's unsupported, and therefore groff's use of it with these older versions pnmcrop is technically invalid.

The man page for Deri's 10.87.1 version of pnmcrop shows a -blank-image option, which he thinks could also solve the problem; however, my older (10.70.0) pnmcrop lacks this option.  But then he notes: "I am not sure whether a call to pnmcrop is even needed, given that pnmcut has removed the excess white pixels! I suspect it is a case of belt and braces."  (That's "belt and suspenders" translated to American.)

If his last conjecture holds true, this suggests a way to remove the spurious pnmcrop warning across the board.

If not, there may still be ways of addressing it with reasonably recent pnmcrop versions.  My ancient pnmcrop (from March 2018--coming up on its 7th birthday!) offers fewer options to get rid of the warning altogether.  The build could suppress them, but Branden has a good reason to oppose this: "grohtml sometimes gets confused and really does manage to produce blank images where content should be."  So, if the pnmcrop calls turn out to not be altogether redundant, I suggest documenting the warning in the PROBLEMS file to inform users it's known to be (usually) harmless.

Dave <barx>
Group Member

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code