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. General Programming
  3. C / C++ / MFC
  4. Image scaling

Image scaling

Scheduled Pinned Locked Moved C / C++ / MFC
algorithmsquestion
9 Posts 4 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.
  • R Offline
    R Offline
    RalfPeter
    wrote on last edited by
    #1

    Can anyone direct me to a source that explains ways to code 'zoom ins and outs'? What I basically need is an algorithm to blow up or shrink down an image by clicking a button or, better, by rubberbanding an area of the image. Thanks, Ralf. ralf.riedel@usm.edu

    M C 2 Replies Last reply
    0
    • R RalfPeter

      Can anyone direct me to a source that explains ways to code 'zoom ins and outs'? What I basically need is an algorithm to blow up or shrink down an image by clicking a button or, better, by rubberbanding an area of the image. Thanks, Ralf. ralf.riedel@usm.edu

      M Offline
      M Offline
      Member 421025
      wrote on last edited by
      #2

      Just type cximage in search box it will take you to the project which does all this and more

      1 Reply Last reply
      0
      • R RalfPeter

        Can anyone direct me to a source that explains ways to code 'zoom ins and outs'? What I basically need is an algorithm to blow up or shrink down an image by clicking a button or, better, by rubberbanding an area of the image. Thanks, Ralf. ralf.riedel@usm.edu

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        StretchBlt is all you need. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

        J 1 Reply Last reply
        0
        • C Christian Graus

          StretchBlt is all you need. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

          J Offline
          J Offline
          Johann Gerell
          wrote on last edited by
          #4

          Christian Graus wrote: StretchBlt is all you need. But it's non-intelligent in its operation as it doesn't resample the image but merely cuts pixels off or blows pixels up. CxImage[^] gets my vote. -- Dad, how strange it is that the pig can speak.
          *thoughtful pause* It must have lost its "oink".
          (my 3-year old daughter Moa, while watching Babe) Human beings, who are almost unique in having the ability
          to learn from the experience of others, are also remarkable
          for their apparent disinclination to do so. (Douglas Adams)

          C 1 Reply Last reply
          0
          • J Johann Gerell

            Christian Graus wrote: StretchBlt is all you need. But it's non-intelligent in its operation as it doesn't resample the image but merely cuts pixels off or blows pixels up. CxImage[^] gets my vote. -- Dad, how strange it is that the pig can speak.
            *thoughtful pause* It must have lost its "oink".
            (my 3-year old daughter Moa, while watching Babe) Human beings, who are almost unique in having the ability
            to learn from the experience of others, are also remarkable
            for their apparent disinclination to do so. (Douglas Adams)

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Johann Gerell wrote: But it's non-intelligent in its operation True, but we're assuming that this guy needs the complexity that comes from adding another class to his project ( not saying that CxImage is hard to use, I've not looked at it ). If you set the right stretch mode, StretchBlt gives reasonable results, why uses a jack hammer to nail in a tack ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

            J 1 Reply Last reply
            0
            • C Christian Graus

              Johann Gerell wrote: But it's non-intelligent in its operation True, but we're assuming that this guy needs the complexity that comes from adding another class to his project ( not saying that CxImage is hard to use, I've not looked at it ). If you set the right stretch mode, StretchBlt gives reasonable results, why uses a jack hammer to nail in a tack ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

              J Offline
              J Offline
              Johann Gerell
              wrote on last edited by
              #6

              Christian Graus wrote: If you set the right stretch mode, StretchBlt gives reasonable results Well, I develop for CE, where the stretch mode can't be set (it's carved in stone). Christian Graus wrote: why uses a jack hammer to nail in a tack That's often the normal scenario when dealing with CE's limited API set. Anyway, the resampling code can easily be broken out from CxImage and be used separately. -- Dad, how strange it is that the pig can speak.
              *thoughtful pause* It must have lost its "oink".
              (my 3-year old daughter Moa, while watching Babe) Human beings, who are almost unique in having the ability
              to learn from the experience of others, are also remarkable
              for their apparent disinclination to do so. (Douglas Adams)

              C 1 Reply Last reply
              0
              • J Johann Gerell

                Christian Graus wrote: If you set the right stretch mode, StretchBlt gives reasonable results Well, I develop for CE, where the stretch mode can't be set (it's carved in stone). Christian Graus wrote: why uses a jack hammer to nail in a tack That's often the normal scenario when dealing with CE's limited API set. Anyway, the resampling code can easily be broken out from CxImage and be used separately. -- Dad, how strange it is that the pig can speak.
                *thoughtful pause* It must have lost its "oink".
                (my 3-year old daughter Moa, while watching Babe) Human beings, who are almost unique in having the ability
                to learn from the experience of others, are also remarkable
                for their apparent disinclination to do so. (Douglas Adams)

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                Johann Gerell wrote: Well, I develop for CE, where the stretch mode can't be set (it's carved in stone). That's a whole different ball game then :-) Johann Gerell wrote: That's often the normal scenario when dealing with CE's limited API set. *grin* well, no-one had mentioned CE before this, so... Johann Gerell wrote: Anyway, the resampling code can easily be broken out from CxImage and be used separately. Sure - that stuff is pretty easy to write in any case. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

                R J 2 Replies Last reply
                0
                • C Christian Graus

                  Johann Gerell wrote: Well, I develop for CE, where the stretch mode can't be set (it's carved in stone). That's a whole different ball game then :-) Johann Gerell wrote: That's often the normal scenario when dealing with CE's limited API set. *grin* well, no-one had mentioned CE before this, so... Johann Gerell wrote: Anyway, the resampling code can easily be broken out from CxImage and be used separately. Sure - that stuff is pretty easy to write in any case. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

                  R Offline
                  R Offline
                  RalfPeter
                  wrote on last edited by
                  #8

                  Thanks for all that discussion. I'll try both, one for a quick and dirty image processing and the other for situations when a more accurate processing is justified. Best, Ralf. ralf.riedel@usm.edu

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    Johann Gerell wrote: Well, I develop for CE, where the stretch mode can't be set (it's carved in stone). That's a whole different ball game then :-) Johann Gerell wrote: That's often the normal scenario when dealing with CE's limited API set. *grin* well, no-one had mentioned CE before this, so... Johann Gerell wrote: Anyway, the resampling code can easily be broken out from CxImage and be used separately. Sure - that stuff is pretty easy to write in any case. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

                    J Offline
                    J Offline
                    Johann Gerell
                    wrote on last edited by
                    #9

                    Christian Graus wrote: *grin* well, no-one had mentioned CE before this, so... No, but you asked for a scenario when the big hammer must be used, so... :cool: -- Dad, how strange it is that the pig can speak.
                    *thoughtful pause* It must have lost its "oink".
                    (my 3-year old daughter Moa, while watching Babe) Human beings, who are almost unique in having the ability
                    to learn from the experience of others, are also remarkable
                    for their apparent disinclination to do so. (Douglas Adams)

                    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