From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,96b1bf0c24ced968 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.83.74 with SMTP id o10mr2667720pay.33.1346652165951; Sun, 02 Sep 2012 23:02:45 -0700 (PDT) Received: by 10.68.195.72 with SMTP id ic8mr2800354pbc.8.1346652165904; Sun, 02 Sep 2012 23:02:45 -0700 (PDT) Path: a8ni19134537pbd.1!nntp.google.com!r4no4418512pbs.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 2 Sep 2012 23:02:45 -0700 (PDT) In-Reply-To: <50406532$0$10734$5b6aafb4@news.zen.co.uk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.178.79.172; posting-account=g6PEmwoAAADhFsmVm6Epjviaw4MLU0b5 NNTP-Posting-Host: 82.178.79.172 References: <7bd3df18-178b-4735-ac43-c6bb6df9e999@googlegroups.com> <50406532$0$10734$5b6aafb4@news.zen.co.uk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <55aade96-7c5d-45a7-a211-cb2c7f04ceeb@googlegroups.com> Subject: Re: Question: re Image Files. From: Anatoly Chernyshev Injection-Date: Mon, 03 Sep 2012 06:02:45 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-09-02T23:02:45-07:00 List-Id: > Would I be correct in guessing that you are planning in reading these >=20 > files with the intention of encrypting the contents? >=20 > If so, then you can save yourself a MASSIVE amount of work by ignoring >=20 > the structure of the files, and simply reading them byte-by-byte. That >=20 > way you get a stream of numbers, all in the range 0-255, and as long >=20 > as the decryption process returns the numbers to exactly what the >=20 > original number was without missing or adding any, you can encrypt any >=20 > file you like. This way the image data will be lost, because the headers will be screwed a= s well. Apparently Austin is trying to play with the pixels only (e.g. for = steganography purposes or whatever). When I had similar problem I've chosen PNG format as input (because the IO = library was immediately available at http://sourceforge.net/projects/png-io= ). For the output I had to write my own package for uncompressed 24 bpp BMP= s (because the format is simple). Then PNG is converted into an integer mat= rix, which could be manipulated any way you like, and then written at any t= ime as BMP (which could later be converted by any graphic editor to other f= ormats if needed). If interested, I put relevant files in www.achernyshev.com/tmp/bmp24bppout.= rar