Function Repository Resource:

ImageSquareQ

Source Notebook

Test if a given image is square or not

Contributed by: Arnoud Buzing

ResourceFunction["ImageSquareQ"][image]

tests if image is square or not.

Examples

Basic Examples (1) 

Use the function:

In[1]:=
ResourceFunction["ImageSquareQ"][\!\(\*
GraphicsBox[
TagBox[RasterBox[CompressedData["
1:eJzt1z2LXGUAxfFndnbmvt+Z2dlNYoyClWISO8FOLEWwiOQDKEaxiRAF8SuI
paDfwcrGSsTCxsTotxBBLHwhSDQZ72qvpzs7h//wm2Fn2nv+e5/7xGtvX3vj
oJTyTj19XHv1vRdu3Xr1/VfW05frN995682bN15/8ea7N968ceu51+bTj1dm
/75P/36I/fFj23xx6dLLpTx+MOv6sW+7clzK5XL106urr9bl9kG5Uyaz2weT
8m05dQdnnX1X0NFgJPuuoKPBSPZdQUeDkey7go4GI9l3BR0NRrLvCjoajGTf
FXQ0GMm+K+hoMJJ9V9DRYCT7rqCjwUj2XUFHg5Hsu4KOBiPZdwUdDUay7wo6
Goxk3xV0NBjJvivoaDCSfVfQ0WAk+66go8FI9l1BR4OR7LuCjgYj2XcFHQ1G
su8KOhqMZN8VdDQYyb4r6Ggwkn1X0NFgJPuuoKPBSPZdQUeDkey7go4GI9l3
BR0NRrLvCjoajGTfFXQ0GMm+K+hoMJJ9V9DRYCT7rqCjwUj2XUFHg5Hsu4KO
BiPZdwUdDUay7wo6Goxk3xV0NBjJvivoaDCSfVfQ0WAk+66go8FI9l1BR4OR
7LuCjgYj2XcFHQ1Gsu8KOhqMZN8VdDQYyb4r6Ggwkn1X0NFgJPuuoKPBSPZd
QUeDkey7go4GI9l3BR0NRrLvCjoajGTfFXQ0GMm+K+hoMJJ9V9DRYCT7rqCj
wUj2XUFHg5Hsu4KOBiPZdwUdDUay7wo6Goxk3xV0NBjJvivoaDCSfVfQ0WAk
+66go8FI9l1BR4OR7LuCjgYj2XcFHQ1Gsu8KOhqMZN8VdDQYyb4r6Ggwkn1X
0NFgJPuuoKPBSPZdQUeDkey7go4GI9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Q0GMm+K+ho
MJJ9V9DRYCT7rqCjwUj2XUFHg5Hsu4KOBiPZdwUdDUay7wo6Goxk3xV0NBjJ
vivoaDCSfVfQ0WAk+66go8FI9l1BR4OR7LuCjgYj2XcFHQ1Gsu8KOhqMZN8V
dDQYyb4r6Ggwkn1X0NFgJPuuoKPBSPZdQUeDkey7go4GI9l3BR0NRrLvCjoa
jGTfFXQ0GMm+K+hoMJJ9V9DRYCT7rqCjwUj2XUFHg5Hsu4KOBiPZdwUdDUay
7wo6Goxk3xV0NBjJvivoaDCSfVfQ0WAk+66go8FI9l1BR4OR7LuCjgYj2XcF
HQ1Gsu8KOhqM9Ddd0i0k
"], {{0, 300}, {300, 0}}, {0, 255},
ColorFunction->RGBColor],
BoxForm`ImageTag["Byte", ColorSpace -> "RGB", Interleaving -> True],
Selectable->False],
DefaultBaseStyle->"ImageGraphics",
ImageSize->Automatic,
ImageSizeRaw->{300, 300},
PlotRange->{{0, 300}, {0, 300}}]\)]
Out[1]=
In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/4bb998d2-2921-41fd-9866-ea0493ec4fba"]
Out[2]=

Scope (2) 

Retrieve the ResourceFunction:

In[3]:=
ResourceFunction["ImageSquareQ"]
Out[3]=

Retrieve the ResourceObject:

In[4]:=
ResourceObject["ImageSquareQ"]
Out[4]=

Publisher

Arnoud Buzing

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.0 – 05 September 2018

License Information