How To Calculate JPG Data As It Loads From The Input Stream












0















How To Calculate JPG Data As It Loads From The Input Stream



I need to calculate RGB pixel data from a JPG file on demand. In other words, I cannot load the whole image. I need to open the stream, skip to the information I need, and ultimately return an array of RGB information I need.



I want to extract all the compression information I need, and use it to go after a specific targeted pixel.



The programming language I need to implement this in is JAVA. Is there any classes/APIs that will help me achieve this? Or do I need to create my own JPGInputStream?










share|improve this question















migrated from cs.stackexchange.com Nov 14 '18 at 18:46


This question came from our site for students, researchers and practitioners of computer science.



















  • See if this Q&A helps you out what is the best java image processing library approach

    – JGlass
    Nov 14 '18 at 19:09
















0















How To Calculate JPG Data As It Loads From The Input Stream



I need to calculate RGB pixel data from a JPG file on demand. In other words, I cannot load the whole image. I need to open the stream, skip to the information I need, and ultimately return an array of RGB information I need.



I want to extract all the compression information I need, and use it to go after a specific targeted pixel.



The programming language I need to implement this in is JAVA. Is there any classes/APIs that will help me achieve this? Or do I need to create my own JPGInputStream?










share|improve this question















migrated from cs.stackexchange.com Nov 14 '18 at 18:46


This question came from our site for students, researchers and practitioners of computer science.



















  • See if this Q&A helps you out what is the best java image processing library approach

    – JGlass
    Nov 14 '18 at 19:09














0












0








0








How To Calculate JPG Data As It Loads From The Input Stream



I need to calculate RGB pixel data from a JPG file on demand. In other words, I cannot load the whole image. I need to open the stream, skip to the information I need, and ultimately return an array of RGB information I need.



I want to extract all the compression information I need, and use it to go after a specific targeted pixel.



The programming language I need to implement this in is JAVA. Is there any classes/APIs that will help me achieve this? Or do I need to create my own JPGInputStream?










share|improve this question
















How To Calculate JPG Data As It Loads From The Input Stream



I need to calculate RGB pixel data from a JPG file on demand. In other words, I cannot load the whole image. I need to open the stream, skip to the information I need, and ultimately return an array of RGB information I need.



I want to extract all the compression information I need, and use it to go after a specific targeted pixel.



The programming language I need to implement this in is JAVA. Is there any classes/APIs that will help me achieve this? Or do I need to create my own JPGInputStream?







java frameworks jpeg






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 4:52









JGlass

9972720




9972720










asked Nov 14 '18 at 18:44









user1780932user1780932

4117




4117




migrated from cs.stackexchange.com Nov 14 '18 at 18:46


This question came from our site for students, researchers and practitioners of computer science.









migrated from cs.stackexchange.com Nov 14 '18 at 18:46


This question came from our site for students, researchers and practitioners of computer science.















  • See if this Q&A helps you out what is the best java image processing library approach

    – JGlass
    Nov 14 '18 at 19:09



















  • See if this Q&A helps you out what is the best java image processing library approach

    – JGlass
    Nov 14 '18 at 19:09

















See if this Q&A helps you out what is the best java image processing library approach

– JGlass
Nov 14 '18 at 19:09





See if this Q&A helps you out what is the best java image processing library approach

– JGlass
Nov 14 '18 at 19:09












1 Answer
1






active

oldest

votes


















1














If your JPEG stream contains a sequential frame, you could decode each scan (usually 1, 3, or 4) as they arrive and display them. It would look pretty funky color wise.



If your JPEG stream contains a progressive frame, you could also decode after each scan. In that case the progression would be pretty normal.



This kind of approach was great in the days of dialup internet where it could take minutes to download a single image. These days, there tends to be little value in it.






share|improve this answer























    Your Answer






    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: "1"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fstackoverflow.com%2fquestions%2f53306882%2fhow-to-calculate-jpg-data-as-it-loads-from-the-input-stream%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    If your JPEG stream contains a sequential frame, you could decode each scan (usually 1, 3, or 4) as they arrive and display them. It would look pretty funky color wise.



    If your JPEG stream contains a progressive frame, you could also decode after each scan. In that case the progression would be pretty normal.



    This kind of approach was great in the days of dialup internet where it could take minutes to download a single image. These days, there tends to be little value in it.






    share|improve this answer




























      1














      If your JPEG stream contains a sequential frame, you could decode each scan (usually 1, 3, or 4) as they arrive and display them. It would look pretty funky color wise.



      If your JPEG stream contains a progressive frame, you could also decode after each scan. In that case the progression would be pretty normal.



      This kind of approach was great in the days of dialup internet where it could take minutes to download a single image. These days, there tends to be little value in it.






      share|improve this answer


























        1












        1








        1







        If your JPEG stream contains a sequential frame, you could decode each scan (usually 1, 3, or 4) as they arrive and display them. It would look pretty funky color wise.



        If your JPEG stream contains a progressive frame, you could also decode after each scan. In that case the progression would be pretty normal.



        This kind of approach was great in the days of dialup internet where it could take minutes to download a single image. These days, there tends to be little value in it.






        share|improve this answer













        If your JPEG stream contains a sequential frame, you could decode each scan (usually 1, 3, or 4) as they arrive and display them. It would look pretty funky color wise.



        If your JPEG stream contains a progressive frame, you could also decode after each scan. In that case the progression would be pretty normal.



        This kind of approach was great in the days of dialup internet where it could take minutes to download a single image. These days, there tends to be little value in it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 12:37









        user3344003user3344003

        14.7k31538




        14.7k31538
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53306882%2fhow-to-calculate-jpg-data-as-it-loads-from-the-input-stream%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

            Florida Star v. B. J. F.

            Danny Elfman

            Lugert, Oklahoma