Make a transparent 448*448 image












3












$begingroup$


This is a simple challenge.



The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.










share|improve this question









$endgroup$












  • $begingroup$
    What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
    $endgroup$
    – 12Me21
    26 mins ago
















3












$begingroup$


This is a simple challenge.



The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.










share|improve this question









$endgroup$












  • $begingroup$
    What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
    $endgroup$
    – 12Me21
    26 mins ago














3












3








3





$begingroup$


This is a simple challenge.



The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.










share|improve this question









$endgroup$




This is a simple challenge.



The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.







code-golf graphical-output






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









AnushAnush

773425




773425












  • $begingroup$
    What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
    $endgroup$
    – 12Me21
    26 mins ago


















  • $begingroup$
    What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
    $endgroup$
    – 12Me21
    26 mins ago
















$begingroup$
What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
$endgroup$
– 12Me21
26 mins ago




$begingroup$
What's to stop people from submitting a 0-byte answer which "outputs" a transparent (invisible) image to the screen?
$endgroup$
– 12Me21
26 mins ago










8 Answers
8






active

oldest

votes


















3












$begingroup$

Imagemagick in some shell, 35



convert -size 448x448 xc:none a.png


Is this allowed?






share|improve this answer









$endgroup$













  • $begingroup$
    Oh! I had no idea this would work. It's surprising and clever, so yes!
    $endgroup$
    – Anush
    59 mins ago





















2












$begingroup$


APL (Dyalog Unicode), 11 bytesSBCS





Full program. Prints 448-by-448-by-4 array representing a 448-by-448 rgba image.



448 448 4⍴0


Try it online!



is reshape






share|improve this answer









$endgroup$





















    1












    $begingroup$

    Processing, 66 bytes



    PGraphics g=createGraphics(448,448);g.beginDraw();g.save("a.png");





    share|improve this answer









    $endgroup$





















      1












      $begingroup$


      C# (Visual C# Interactive Compiler), 58 bytes





      _=>Enumerable.Repeat(Enumerable.Repeat((0,0,0,0),448),448)


      Since the image IO rules allow output as a matrix of RGB values, this submission outputs a matrix of RGBA values, represented by tuples with four values, all being 0.



      Try it online!






      share|improve this answer









      $endgroup$





















        1












        $begingroup$


        Jelly, 10 bytes



        x4Wẋ448Ɗ2¡


        Try it online!



        Outputs a 448x448x4 array






        share|improve this answer









        $endgroup$





















          1












          $begingroup$


          dzaima/APL + APLP5, 18 bytes



          {P5.img 448 448⍴0}


          Function that outputs an image object that can be drawn to the screen (for no effect) or converted back to pixel values.






          share|improve this answer









          $endgroup$





















            1












            $begingroup$

            Java 8, 101 bytes





            Outputs an empty png image saved as a file with the given name s



            s->javax.imageio.ImageIO.write(new java.awt.image.BufferedImage(448,448,2),"png",new java.io.File(s))


            Try it online... somehow






            share|improve this answer









            $endgroup$









            • 1




              $begingroup$
              Do you mean empty or transparent?
              $endgroup$
              – Anush
              39 mins ago










            • $begingroup$
              I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
              $endgroup$
              – Benjamin Urquhart
              37 mins ago



















            1












            $begingroup$

            Go, 70



            import i"image";func a()i.Image{return i.NewRGBA(i.Rect(0,0,448,448))}


            Never seen a golf in Go before. Defines a function called a that outputs the image






            share|improve this answer











            $endgroup$













              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "200"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f181409%2fmake-a-transparent-448448-image%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              8 Answers
              8






              active

              oldest

              votes








              8 Answers
              8






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              3












              $begingroup$

              Imagemagick in some shell, 35



              convert -size 448x448 xc:none a.png


              Is this allowed?






              share|improve this answer









              $endgroup$













              • $begingroup$
                Oh! I had no idea this would work. It's surprising and clever, so yes!
                $endgroup$
                – Anush
                59 mins ago


















              3












              $begingroup$

              Imagemagick in some shell, 35



              convert -size 448x448 xc:none a.png


              Is this allowed?






              share|improve this answer









              $endgroup$













              • $begingroup$
                Oh! I had no idea this would work. It's surprising and clever, so yes!
                $endgroup$
                – Anush
                59 mins ago
















              3












              3








              3





              $begingroup$

              Imagemagick in some shell, 35



              convert -size 448x448 xc:none a.png


              Is this allowed?






              share|improve this answer









              $endgroup$



              Imagemagick in some shell, 35



              convert -size 448x448 xc:none a.png


              Is this allowed?







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 1 hour ago









              zeveezevee

              27016




              27016












              • $begingroup$
                Oh! I had no idea this would work. It's surprising and clever, so yes!
                $endgroup$
                – Anush
                59 mins ago




















              • $begingroup$
                Oh! I had no idea this would work. It's surprising and clever, so yes!
                $endgroup$
                – Anush
                59 mins ago


















              $begingroup$
              Oh! I had no idea this would work. It's surprising and clever, so yes!
              $endgroup$
              – Anush
              59 mins ago






              $begingroup$
              Oh! I had no idea this would work. It's surprising and clever, so yes!
              $endgroup$
              – Anush
              59 mins ago













              2












              $begingroup$


              APL (Dyalog Unicode), 11 bytesSBCS





              Full program. Prints 448-by-448-by-4 array representing a 448-by-448 rgba image.



              448 448 4⍴0


              Try it online!



              is reshape






              share|improve this answer









              $endgroup$


















                2












                $begingroup$


                APL (Dyalog Unicode), 11 bytesSBCS





                Full program. Prints 448-by-448-by-4 array representing a 448-by-448 rgba image.



                448 448 4⍴0


                Try it online!



                is reshape






                share|improve this answer









                $endgroup$
















                  2












                  2








                  2





                  $begingroup$


                  APL (Dyalog Unicode), 11 bytesSBCS





                  Full program. Prints 448-by-448-by-4 array representing a 448-by-448 rgba image.



                  448 448 4⍴0


                  Try it online!



                  is reshape






                  share|improve this answer









                  $endgroup$




                  APL (Dyalog Unicode), 11 bytesSBCS





                  Full program. Prints 448-by-448-by-4 array representing a 448-by-448 rgba image.



                  448 448 4⍴0


                  Try it online!



                  is reshape







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  AdámAdám

                  28.6k276204




                  28.6k276204























                      1












                      $begingroup$

                      Processing, 66 bytes



                      PGraphics g=createGraphics(448,448);g.beginDraw();g.save("a.png");





                      share|improve this answer









                      $endgroup$


















                        1












                        $begingroup$

                        Processing, 66 bytes



                        PGraphics g=createGraphics(448,448);g.beginDraw();g.save("a.png");





                        share|improve this answer









                        $endgroup$
















                          1












                          1








                          1





                          $begingroup$

                          Processing, 66 bytes



                          PGraphics g=createGraphics(448,448);g.beginDraw();g.save("a.png");





                          share|improve this answer









                          $endgroup$



                          Processing, 66 bytes



                          PGraphics g=createGraphics(448,448);g.beginDraw();g.save("a.png");






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 1 hour ago









                          dzaimadzaima

                          15.3k21856




                          15.3k21856























                              1












                              $begingroup$


                              C# (Visual C# Interactive Compiler), 58 bytes





                              _=>Enumerable.Repeat(Enumerable.Repeat((0,0,0,0),448),448)


                              Since the image IO rules allow output as a matrix of RGB values, this submission outputs a matrix of RGBA values, represented by tuples with four values, all being 0.



                              Try it online!






                              share|improve this answer









                              $endgroup$


















                                1












                                $begingroup$


                                C# (Visual C# Interactive Compiler), 58 bytes





                                _=>Enumerable.Repeat(Enumerable.Repeat((0,0,0,0),448),448)


                                Since the image IO rules allow output as a matrix of RGB values, this submission outputs a matrix of RGBA values, represented by tuples with four values, all being 0.



                                Try it online!






                                share|improve this answer









                                $endgroup$
















                                  1












                                  1








                                  1





                                  $begingroup$


                                  C# (Visual C# Interactive Compiler), 58 bytes





                                  _=>Enumerable.Repeat(Enumerable.Repeat((0,0,0,0),448),448)


                                  Since the image IO rules allow output as a matrix of RGB values, this submission outputs a matrix of RGBA values, represented by tuples with four values, all being 0.



                                  Try it online!






                                  share|improve this answer









                                  $endgroup$




                                  C# (Visual C# Interactive Compiler), 58 bytes





                                  _=>Enumerable.Repeat(Enumerable.Repeat((0,0,0,0),448),448)


                                  Since the image IO rules allow output as a matrix of RGB values, this submission outputs a matrix of RGBA values, represented by tuples with four values, all being 0.



                                  Try it online!







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered 1 hour ago









                                  Embodiment of IgnoranceEmbodiment of Ignorance

                                  1,658124




                                  1,658124























                                      1












                                      $begingroup$


                                      Jelly, 10 bytes



                                      x4Wẋ448Ɗ2¡


                                      Try it online!



                                      Outputs a 448x448x4 array






                                      share|improve this answer









                                      $endgroup$


















                                        1












                                        $begingroup$


                                        Jelly, 10 bytes



                                        x4Wẋ448Ɗ2¡


                                        Try it online!



                                        Outputs a 448x448x4 array






                                        share|improve this answer









                                        $endgroup$
















                                          1












                                          1








                                          1





                                          $begingroup$


                                          Jelly, 10 bytes



                                          x4Wẋ448Ɗ2¡


                                          Try it online!



                                          Outputs a 448x448x4 array






                                          share|improve this answer









                                          $endgroup$




                                          Jelly, 10 bytes



                                          x4Wẋ448Ɗ2¡


                                          Try it online!



                                          Outputs a 448x448x4 array







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered 1 hour ago









                                          Nick KennedyNick Kennedy

                                          63137




                                          63137























                                              1












                                              $begingroup$


                                              dzaima/APL + APLP5, 18 bytes



                                              {P5.img 448 448⍴0}


                                              Function that outputs an image object that can be drawn to the screen (for no effect) or converted back to pixel values.






                                              share|improve this answer









                                              $endgroup$


















                                                1












                                                $begingroup$


                                                dzaima/APL + APLP5, 18 bytes



                                                {P5.img 448 448⍴0}


                                                Function that outputs an image object that can be drawn to the screen (for no effect) or converted back to pixel values.






                                                share|improve this answer









                                                $endgroup$
















                                                  1












                                                  1








                                                  1





                                                  $begingroup$


                                                  dzaima/APL + APLP5, 18 bytes



                                                  {P5.img 448 448⍴0}


                                                  Function that outputs an image object that can be drawn to the screen (for no effect) or converted back to pixel values.






                                                  share|improve this answer









                                                  $endgroup$




                                                  dzaima/APL + APLP5, 18 bytes



                                                  {P5.img 448 448⍴0}


                                                  Function that outputs an image object that can be drawn to the screen (for no effect) or converted back to pixel values.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered 1 hour ago









                                                  dzaimadzaima

                                                  15.3k21856




                                                  15.3k21856























                                                      1












                                                      $begingroup$

                                                      Java 8, 101 bytes





                                                      Outputs an empty png image saved as a file with the given name s



                                                      s->javax.imageio.ImageIO.write(new java.awt.image.BufferedImage(448,448,2),"png",new java.io.File(s))


                                                      Try it online... somehow






                                                      share|improve this answer









                                                      $endgroup$









                                                      • 1




                                                        $begingroup$
                                                        Do you mean empty or transparent?
                                                        $endgroup$
                                                        – Anush
                                                        39 mins ago










                                                      • $begingroup$
                                                        I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                        $endgroup$
                                                        – Benjamin Urquhart
                                                        37 mins ago
















                                                      1












                                                      $begingroup$

                                                      Java 8, 101 bytes





                                                      Outputs an empty png image saved as a file with the given name s



                                                      s->javax.imageio.ImageIO.write(new java.awt.image.BufferedImage(448,448,2),"png",new java.io.File(s))


                                                      Try it online... somehow






                                                      share|improve this answer









                                                      $endgroup$









                                                      • 1




                                                        $begingroup$
                                                        Do you mean empty or transparent?
                                                        $endgroup$
                                                        – Anush
                                                        39 mins ago










                                                      • $begingroup$
                                                        I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                        $endgroup$
                                                        – Benjamin Urquhart
                                                        37 mins ago














                                                      1












                                                      1








                                                      1





                                                      $begingroup$

                                                      Java 8, 101 bytes





                                                      Outputs an empty png image saved as a file with the given name s



                                                      s->javax.imageio.ImageIO.write(new java.awt.image.BufferedImage(448,448,2),"png",new java.io.File(s))


                                                      Try it online... somehow






                                                      share|improve this answer









                                                      $endgroup$



                                                      Java 8, 101 bytes





                                                      Outputs an empty png image saved as a file with the given name s



                                                      s->javax.imageio.ImageIO.write(new java.awt.image.BufferedImage(448,448,2),"png",new java.io.File(s))


                                                      Try it online... somehow







                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered 40 mins ago









                                                      Benjamin UrquhartBenjamin Urquhart

                                                      714




                                                      714








                                                      • 1




                                                        $begingroup$
                                                        Do you mean empty or transparent?
                                                        $endgroup$
                                                        – Anush
                                                        39 mins ago










                                                      • $begingroup$
                                                        I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                        $endgroup$
                                                        – Benjamin Urquhart
                                                        37 mins ago














                                                      • 1




                                                        $begingroup$
                                                        Do you mean empty or transparent?
                                                        $endgroup$
                                                        – Anush
                                                        39 mins ago










                                                      • $begingroup$
                                                        I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                        $endgroup$
                                                        – Benjamin Urquhart
                                                        37 mins ago








                                                      1




                                                      1




                                                      $begingroup$
                                                      Do you mean empty or transparent?
                                                      $endgroup$
                                                      – Anush
                                                      39 mins ago




                                                      $begingroup$
                                                      Do you mean empty or transparent?
                                                      $endgroup$
                                                      – Anush
                                                      39 mins ago












                                                      $begingroup$
                                                      I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                      $endgroup$
                                                      – Benjamin Urquhart
                                                      37 mins ago




                                                      $begingroup$
                                                      I'm pretty sure empty pngs are transparent, are they not? I typed this up on my phone so I can't check
                                                      $endgroup$
                                                      – Benjamin Urquhart
                                                      37 mins ago











                                                      1












                                                      $begingroup$

                                                      Go, 70



                                                      import i"image";func a()i.Image{return i.NewRGBA(i.Rect(0,0,448,448))}


                                                      Never seen a golf in Go before. Defines a function called a that outputs the image






                                                      share|improve this answer











                                                      $endgroup$


















                                                        1












                                                        $begingroup$

                                                        Go, 70



                                                        import i"image";func a()i.Image{return i.NewRGBA(i.Rect(0,0,448,448))}


                                                        Never seen a golf in Go before. Defines a function called a that outputs the image






                                                        share|improve this answer











                                                        $endgroup$
















                                                          1












                                                          1








                                                          1





                                                          $begingroup$

                                                          Go, 70



                                                          import i"image";func a()i.Image{return i.NewRGBA(i.Rect(0,0,448,448))}


                                                          Never seen a golf in Go before. Defines a function called a that outputs the image






                                                          share|improve this answer











                                                          $endgroup$



                                                          Go, 70



                                                          import i"image";func a()i.Image{return i.NewRGBA(i.Rect(0,0,448,448))}


                                                          Never seen a golf in Go before. Defines a function called a that outputs the image







                                                          share|improve this answer














                                                          share|improve this answer



                                                          share|improve this answer








                                                          edited 6 mins ago









                                                          Embodiment of Ignorance

                                                          1,658124




                                                          1,658124










                                                          answered 58 mins ago









                                                          zeveezevee

                                                          27016




                                                          27016






























                                                              draft saved

                                                              draft discarded




















































                                                              If this is an answer to a challenge…




                                                              • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                              • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                Explanations of your answer make it more interesting to read and are very much encouraged.


                                                              • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.



                                                              More generally…




                                                              • …Please make sure to answer the question and provide sufficient detail.


                                                              • …Avoid asking for help, clarification or responding to other answers (use comments instead).





                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f181409%2fmake-a-transparent-448448-image%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Alcázar de San Juan

                                                              Griza ansero

                                                              Heinkel He 51