Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Is the web allergic to JPG?

Is the web allergic to JPG?

Scheduled Pinned Locked Moved The Lounge
question
36 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    I'm not making a web browser. I need bare minimum functionality. This isn't a Cortex-A I'm targeting. :)

    To err is human. Fortune favors the monsters.

    0 Offline
    0 Offline
    0x01AA
    wrote on last edited by
    #16

    Quote:

    I'm not making a web browser.

    Not at the moment... But all the stuff I'm reading from you, there is a chance that you develop a web browser for ATTINY85 or similars ;P :laugh:

    H 1 Reply Last reply
    0
    • 0 0x01AA

      Quote:

      I'm not making a web browser.

      Not at the moment... But all the stuff I'm reading from you, there is a chance that you develop a web browser for ATTINY85 or similars ;P :laugh:

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #17

      Okay, I deserved that. :laugh:

      To err is human. Fortune favors the monsters.

      1 Reply Last reply
      0
      • H honey the codewitch

        I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

        To err is human. Fortune favors the monsters.

        D Offline
        D Offline
        DerekT P
        wrote on last edited by
        #18

        Why limit yourself to a logo? Using a company logo has drawbacks anyway, such as legal copyright etc., or implications of involvement with the company (as you suggest by not wishing to use Microsoft or Facebook examples). Why not choose a public domain image of a recognisable landmark or figure, or even take your own photo of such a thing and host it on the web (thus avoiding any IP issues)? (Finding small JPGs is likely to be a hard task anyway since for small images, there is often little benefit in using JPG compression - it just results in ugly artefacts if compression is high and no advantage if compression is low. It's larger images where JPG comes into its own, really...)

        H 1 Reply Last reply
        0
        • H honey the codewitch

          Yeah, but they're not geared for IoT. I had to gut the truetype stuff to make it all work from a stream instead of RAM. I wound up changing most of that file. I don't want to go through the same thing with the PNG loading. I'd like to look for a different source - preferably something that loads it progressively. The STB stuff is PC gaming code so it's geared for having gobs of RAM.

          To err is human. Fortune favors the monsters.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #19

          honey the codewitch wrote:

          I'd like to look for a different source - preferably something that loads it progressively.

          I just glanced over the PNG spec and progressive decoding only works on PNG images that were 'progressive encoded'. I think that means multiple IDAT sections. With a normal (non-progressive) PNG having a single IDAT. So you would only benefit here if you control the image encoding too. Progressive encoded PNG images are rare today from my understanding.

          H 1 Reply Last reply
          0
          • H honey the codewitch

            I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

            To err is human. Fortune favors the monsters.

            O Offline
            O Offline
            obermd
            wrote on last edited by
            #20

            JPG legally requires a licensing fee. As a result PNG was developed to avoid this fee.

            D 1 Reply Last reply
            0
            • L Lost User

              honey the codewitch wrote:

              I'd like to look for a different source - preferably something that loads it progressively.

              I just glanced over the PNG spec and progressive decoding only works on PNG images that were 'progressive encoded'. I think that means multiple IDAT sections. With a normal (non-progressive) PNG having a single IDAT. So you would only benefit here if you control the image encoding too. Progressive encoded PNG images are rare today from my understanding.

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #21

              I think I can still do it line by line

              To err is human. Fortune favors the monsters.

              L 1 Reply Last reply
              0
              • D DerekT P

                Why limit yourself to a logo? Using a company logo has drawbacks anyway, such as legal copyright etc., or implications of involvement with the company (as you suggest by not wishing to use Microsoft or Facebook examples). Why not choose a public domain image of a recognisable landmark or figure, or even take your own photo of such a thing and host it on the web (thus avoiding any IP issues)? (Finding small JPGs is likely to be a hard task anyway since for small images, there is often little benefit in using JPG compression - it just results in ugly artefacts if compression is high and no advantage if compression is low. It's larger images where JPG comes into its own, really...)

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #22

                viewing an image over the web does not violate copyright laws, even if the viewer is an IoT device.

                To err is human. Fortune favors the monsters.

                D 1 Reply Last reply
                0
                • H honey the codewitch

                  I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                  To err is human. Fortune favors the monsters.

                  M Offline
                  M Offline
                  markkuk
                  wrote on last edited by
                  #23

                  You can get random, free to use photo JPEGs from Lorem Picsum[^]. For example, try loading https://picsum.photos/320/240 from your code.

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    I think I can still do it line by line

                    To err is human. Fortune favors the monsters.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #24

                    Sweet, Can you point out which step in decoding PNG images uses lines? I'd like to see how it's done. Here's an overview[^], show me which decoding step uses lines.

                    H 1 Reply Last reply
                    0
                    • L Lost User

                      Sweet, Can you point out which step in decoding PNG images uses lines? I'd like to see how it's done. Here's an overview[^], show me which decoding step uses lines.

                      H Offline
                      H Offline
                      honey the codewitch
                      wrote on last edited by
                      #25

                      I couldn't say off hand. I was looking at some code on github some months back on doing this.

                      To err is human. Fortune favors the monsters.

                      1 Reply Last reply
                      0
                      • H honey the codewitch

                        I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                        To err is human. Fortune favors the monsters.

                        R Offline
                        R Offline
                        RedDk
                        wrote on last edited by
                        #26

                        No. It just embraces transparency. For unknown reasons. Ahhchooo!

                        1 Reply Last reply
                        0
                        • H honey the codewitch

                          I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                          To err is human. Fortune favors the monsters.

                          P Offline
                          P Offline
                          PIEBALDconsult
                          wrote on last edited by
                          #27

                          Jpg is filth.

                          1 Reply Last reply
                          0
                          • O obermd

                            JPG legally requires a licensing fee. As a result PNG was developed to avoid this fee.

                            D Offline
                            D Offline
                            DerekT P
                            wrote on last edited by
                            #28

                            I think that was .GIF, which was developed by Compuserve who got a bit tetchy about it. Not aware of a license fee for JPG images...

                            1 Reply Last reply
                            0
                            • H honey the codewitch

                              viewing an image over the web does not violate copyright laws, even if the viewer is an IoT device.

                              To err is human. Fortune favors the monsters.

                              D Offline
                              D Offline
                              DerekT P
                              wrote on last edited by
                              #29

                              True, but if you (say) use the Coca-Cola logo and advise people to view said logo on your device (even as a proof-of-concept) there's the risk that Coca-Cola will complain (fair use, passing-off, trademark etc) or demand you include a copyright / trademark notice. If you're aiming to have an instantly-recognisable logo, companies of that size/fame can be a bit tetchy about how their logo is used. Very unlikely, true, but possible. But for those same reasons of control and wanting a "perfect" viewing experience, they're unlikely to have a .JPG logo anyway.

                              H 1 Reply Last reply
                              0
                              • H honey the codewitch

                                I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                                To err is human. Fortune favors the monsters.

                                L Offline
                                L Offline
                                lmoelleb
                                wrote on last edited by
                                #30

                                If you do find one please let the internet authorities know so the guilty can be thrown in jail. JPEG is for photos. Using it for logos, technical drawings and similar is just horrible.

                                1 Reply Last reply
                                0
                                • H honey the codewitch

                                  I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                                  To err is human. Fortune favors the monsters.

                                  C Offline
                                  C Offline
                                  Carlos Perez Chavez
                                  wrote on last edited by
                                  #31

                                  Corporate logos tend to be lossless so they can be displayed in their maximum quality.

                                  1 Reply Last reply
                                  0
                                  • H honey the codewitch

                                    I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                                    To err is human. Fortune favors the monsters.

                                    A Offline
                                    A Offline
                                    Amol Tarte
                                    wrote on last edited by
                                    #32

                                    Stock Images, Royalty-Free Pictures, Illustrations & Videos - iStock[^] It has a nice collection of jpegs. But can't say progressive loading or interlaced.

                                    With Warm Regards, Amol.

                                    1 Reply Last reply
                                    0
                                    • H honey the codewitch

                                      I was going to make a small demo of loading a jpg from the web and consuming it on an ESP32 The image should be small (320x240 ish) because i can't resize it, it should be retrievable by an end user for verification and hopefully it would be a prominent recognizable figure on the web. Here's what I've checked: Code Project's logo (gif) Google's logo (png) Twitter (png, and huge) Reddit (not easily retrievable) Github (not easily retrievable) Youtube (not easily retrievable) Here's what I don't want to promote - even by way of a demo: Microsoft Facebook I feel like maybe I have some tunnel vision. Surely there is site with a prominent logo in jpg that's easily accessible from a browser, no? Am I being unrealistic? Should I implement png? (I really don't want to for reasons)

                                      To err is human. Fortune favors the monsters.

                                      S Offline
                                      S Offline
                                      SickPup404
                                      wrote on last edited by
                                      #33

                                      LOL! Even the "Joint Photographic Experts Group" page uses PNG! JPEG site[^]

                                      L 1 Reply Last reply
                                      0
                                      • D DerekT P

                                        True, but if you (say) use the Coca-Cola logo and advise people to view said logo on your device (even as a proof-of-concept) there's the risk that Coca-Cola will complain (fair use, passing-off, trademark etc) or demand you include a copyright / trademark notice. If you're aiming to have an instantly-recognisable logo, companies of that size/fame can be a bit tetchy about how their logo is used. Very unlikely, true, but possible. But for those same reasons of control and wanting a "perfect" viewing experience, they're unlikely to have a .JPG logo anyway.

                                        H Offline
                                        H Offline
                                        honey the codewitch
                                        wrote on last edited by
                                        #34

                                        Pretty sure Coca-Cola isn't going to come after me for a sample project. I'll risk it. :laugh:

                                        To err is human. Fortune favors the monsters.

                                        1 Reply Last reply
                                        0
                                        • S SickPup404

                                          LOL! Even the "Joint Photographic Experts Group" page uses PNG! JPEG site[^]

                                          L Offline
                                          L Offline
                                          lmoelleb
                                          wrote on last edited by
                                          #35

                                          I expect them to know when to use JPEG and when not to use it, and clearly they do... And that is somehow funny? Why? PNG and JPEG are very different formats, and in most cases it is clear which one to use. Try to load the PNG they have into paint or whatever you have, then save it as JPEG. Now load the JPEG and zoom in on the high contrast ares - like around text. Now you know when not to choose JPEG. Similar try taking a JPEG photo of nature in good quality and save it as PNG (or better, a raw image saved in both if you have a camera that can store raw images). Look at the file size compared to the perceived quality. Now you know when not to choose PNG. Of course there are cased in-between - photos that for example contains a sign with text. Then you have to choose one or the other, with the downside it brings.

                                          S 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups