Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #2431

Re: VB6 Image Resizer

From GS <gs@v.invalid>
Newsgroups comp.lang.basic.visual.misc, microsoft.public.vb.general.discussion
Subject Re: VB6 Image Resizer
Date 2020-03-29 13:54 -0400
Organization A noiseless patient Spider
Message-ID <r5qnc4$1b2$1@dont-email.me> (permalink)
References (1 earlier) <r5nlho$5i0$1@dont-email.me> <20200328171731.0000601c@eternal-september.org> <r5o5tf$pbi$1@dont-email.me> <20200329154826.00007a8d@eternal-september.org> <r5qm0a$lne$1@dont-email.me>

Cross-posted to 2 groups.

Show all headers | View raw


>> It was Sat, 28 Mar 2020 14:43:48 -0400 when
>> "Mayayana" <mayayana@invalid.nospam> wrote:
>>
>>>   I maybe should have explained that: One can't
>>> just extract a thumbnail and load it into a
>>> picturebox. A JPG thumbnail is, in fact, an actual
>>> file. But uncompressed RGB thumbnails are in reverse
>>> byte order and have no header. So the bytes have
>>> to be reversed. Then a header has to be created.
>>> Only then do you have a file that can be loaded.
>>
>> My point is that Windows GDI APIs work on DIBs, those
>> are an in-memory representation of an image which may
>> then be stored to (or retrieved from) whatever
>> format, be it JPG, PNG or whatever, such formats are
>> just STORAGE formats, so instead of focusing on how a
>> given image is stored, it would be a better idea to
>> focus on how to quickly render it, then, to retrieve
>> the image from storage and decode it, there are a
>> bunch of libraries and APIs, so that shouldn't be a
>> big issue, nor it would be how the image is stored,
>> once you load and decode it from storage, you'll have
>> a DIB and that's all you need to show/manipulate it,
>> no need to worry about orientation/format/whatever
>
> The .NET examples I've found seem to do this because when they Save the 
> modified image the format is passed as arg2. Since VB6 doesn't work with the 
> .NET Framework (or does it somehow?) I'm looking to duplicate in VB6!

So what I'm looking to do is this:

  1.  Loop thru a dir and grab each pic file to process;
      Already got this working recursively!

  Need way to do the following:
  2.  Determine orientation by examine w/h max to get new width;
      This will be 480 if portrait, 640 if landscape.
      Aspect ratio will auto-set height.

  3.  Save the pic file by overwriting existing;

-- 
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
  comp.lang.basic.visual.misc
  microsoft.public.vb.general.discussion

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

VB6 Image Resizer GS <gs@v.invalid> - 2020-03-28 00:26 -0400
  Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-28 10:04 -0400
    Re: VB6 Image Resizer Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2020-03-28 17:17 +0100
      Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-28 14:12 -0400
      Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-28 14:43 -0400
        Re: VB6 Image Resizer Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2020-03-29 15:48 +0200
          Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-29 10:41 -0400
          Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-29 13:30 -0400
            Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-29 13:54 -0400
              Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-29 15:36 -0400
                Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-29 16:19 -0400
                Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-29 18:40 -0400
                Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-29 18:49 -0400
                Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-29 23:17 -0400
                Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 07:44 -0400
                Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-30 09:52 -0400
                Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 12:37 -0400
                Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 13:35 -0400
    Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-28 14:59 -0400
      Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-28 16:39 -0400
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-28 17:57 -0400
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-28 18:44 -0400
          Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-28 22:49 -0400
            Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-29 13:22 -0400
  Re: VB6 Image Resizer "Peter T" <askmy@email.com> - 2020-03-30 17:29 +0100
    Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 12:34 -0400
      Re: VB6 Image Resizer "Peter T" <askmy@email.com> - 2020-03-31 10:59 +0100
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-31 09:43 -0400
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-31 12:53 -0400
  Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-30 18:20 -0400
    Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 18:50 -0400
    Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 18:56 -0400
      Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-30 21:24 -0400
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 21:30 -0400
          Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-30 22:01 -0400
            Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-30 22:11 -0400
  Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-31 17:41 -0400
    Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-31 17:51 -0400
      Re: VB6 Image Resizer "Mayayana" <mayayana@invalid.nospam> - 2020-03-31 21:08 -0400
        Re: VB6 Image Resizer GS <gs@v.invalid> - 2020-03-31 21:14 -0400

csiph-web