Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Franz_aRTiglio Newsgroups: it.comp.lang.visual-basic Subject: Re: =?ISO-8859-15?Q?Curiosit=E0_su_file_BMP_e_PDF?= Date: Thu, 28 Apr 2016 16:55:16 +0200 Organization: Aioe.org NNTP Server Lines: 37 Message-ID: References: NNTP-Posting-Host: RKb9fkdAY0CPSWO5zJTFow.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-ICQ: 1931503972 X-Newsreader: MesNews/1.08.06.00-it Xref: csiph.com it.comp.lang.visual-basic:18796 Franz_aRTiglio ha usato la sua tastiera per scrivere : visto or ora (m'era sfuggito): offset 14 "profondità di colore dell'immagine in bit per pixel, dev'essere uno dei seguenti valori: 1, 4, 8, 16, 24 o 32. In caso di 1, 4 o 8 bit per pixel i colori sono indicizzati. I valori 16 e 32 sono poco comuni. Nella versione 5 del formato si può usare il valore 0 quando viene incapsulata un'immagine JPEG o PNG." If bfType = "BM" Then ' BITMAPINFOHEADER Get #fb, , biSize Get #fb, , biWidth Get #fb, , biHeight Get #fb, , biPlanes Get #fb, , biBitCount Get #fb, , biCompression Get #fb, , biSizeImage Get #fb, , biXPelsPerMeter Get #fb, , biYPelsPerMeter Get #fb, , biClrUsed Get #fb, , biClrImportant BPP = biBitCount If BPP <= 8 Then scommetto che nell'immagine "incriminata" biBitCount ( e quindi BPP ) risulta zero, il modulo da te postato dà per scontato che se e' inferiore o uguale a 8, BPP e' per forza 1 o 4 e si regola di conseguenza, senza considerare che può essere una palette di tipo jpg o png, non mi stupirei di scorire che poi scazza quando conta con biClrUsed e biClrImportant.