question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve ifthenelse and Image docs

See original GitHub issue

Is your feature request related to a problem? Please describe. pyvips.Image.ifthenelse documentation is confusing.

Describe the solution you’d like Make the documentation answer these questions:

  • What do th and el stand for? Readability counts.
  • If they are then and else, where is the if? After reading the second time I got that it’s self which is named cond but it looks a bit inconsistent to give th and el new names (in1 and in2) right after they were first introduced.
  • Why it says that it requires an image when all over the search results you get examples with lists and even sets in place of images? The Image docs desperately lack an explanation for this. What do the numbers in these lists and sets stand for?

Describe alternatives you’ve considered Sticking with my ImageMagick script that I had much less problems making.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jcupittcommented, Aug 25, 2020

Thank you for the suggestions. It’s interesting to see an outsider’s take – I’ve been looking at this stuff for so long that of course it all seems simple and obvious to me.

I’ve tried to incorporate your ideas and credited you in CHANGES.

1reaction
jcupittcommented, Aug 24, 2020

You’re right, th and el are a bit confusing. I changed them to in1 and in2 to match the introspection names.

https://github.com/libvips/pyvips/commit/c9da36c4c5800051d239fc249ff90d8354660357

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add and edit images - Google Workspace Learning Center
Crop, recolor, and more right in Google Docs and Google Slides. Or, get suggestions for relevant images based on your content, and add...
Read more >
Glide Docs • If → Then → Else Column
The If → Then → Else Column allows you to produce a new set of data for your app based on a set...
Read more >
How To Work With Images in Google Docs - Zapier
Insert Images in a Google Doc. The simplest way to insert an image is click-and-drag. Just find the image you want to insert...
Read more >
Easy Conditional Mail Merge Formatting (If...Then...Else)
However, you may employ an IF…THEN…ELSE rule to modify formatting and ... images, invoices, or documents to each recipient in a mass email....
Read more >
Set the rules for a mail merge - Microsoft Support
The "Past due" example would use an If...Then...Else rule, specifying to include the text, "Past due" for recipients where the value of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found