[arachne] Re: skewed BMPs.....

Arachne at FreeLists---The Arachne Fan Club!

Fantastic work Michal, Glenn. Two fixes within a day!

But give me a break, I hardly had time to update the 2DoList <G>
Shall I put it down as scheduled for release with 1.75GPL?

----- Original Message ----- 
From: "Glenn McCorkle" <glennmcc@xxxxxxxxxx>
To: "Arachne4DOS" <arachne4dos@xxxxxxxxxxxx>
Sent: Saturday, May 08, 2004 3:49 AM
Subject: [a4dos-list] skewed BMPs.....


>
> In a message to arachne@xxxxxxxxxxxxx, Michal Tyc said..........
>
> |[arachne] Re: BMP files not displayed correctly (was Verification
> |
> |* From: "Michal H. Tyc" <mht@xxxxxxxxxxxxxxxx>
> |* To: arachne@xxxxxxxxxxxxx
> |* Date: Sat, 08 May 2004 01:10:39 +0100
> |
> |Arachne at FreeLists---The Arachne Fan Club!
> |
> |On Fri, 7 May 2004 13:26:04 +0100, John Sparks wrote:
> |
> |> Small .bmp files from 0spam.com are mangled by Arachne. The fil
> |> in cache displays OK in other apps. An example has been placed
> |>         http://www.johncsparks.plus.com/4810.bmp
> |
> |> You should be able to read the digits 4810
> |
> |Let's see what can be done...
> |
> |HDRAWBMP.C is a piece of cr*p. I just fixed an obvious bug result
> |in wrong rounding of number of bytes per line in BMP image. The i
> |is no longer skewed, as you can see in the attachment (if it pass
> |-- this is why I made it UU instead of MIME; use UUDECODE on .CNM
> |file if it isn't automatically processed). Anyway, I still have t
> |BMP file format docs more carefully (or even find better docs tha
> |I have), because the rounding I fixed was just mathematically inc
> |(and encoded in far too many instructions, BTW), and I have to le
> |whether the whole algorithm is OK.
> |
> |However, the image is still somehow garbled, even if the digits c
> |read, and I seem to know why -- one of the variables is used in a
> |strange way; the problem is that I haven't yet figured out from
> |the 250 lines long loop what is this variable exactly used for ;-
> |
> |As a surprise-bonus (not for me, this behavior is directly relate
> |abovementioned variable), the vertical lines are displayed as str
> |when the image isn't put in the top left corner of the screen (e.
> |it is embedded in a test HTML page).
> |
> |Anyway, you may consider the problem as addressed and already par
> |fixed. Quite quickly, eh? ;-)
> |
> |Greetings,
> |
> |Michal
>
> Michal,
>
> After reading your message, I went to see if I could fix it also.
>
> Did I come-up-with the same fix as you ?
>
> --- clipped from HDRAWBMP.C ---
>
>  if(type==4)
>  {
>   k=bmp->size_x%8;
> //!!glennmcc: May 07, 2004 -- Michal Tyc pointed out this error
> // in rounding which causes some BMPs to be 'skewed' when displayed
>   linebytes=(bmp->size_x+k)/2;
> //  linebytes=bmp->size_x/2;
>  }
>
> _______________________________
>
>
> John,
>
> Does this now look correct ?
> (page was edited to turn <a href= into <img src= to display the BMP)
> http://www.cisnet.com/glennmcc/images/!skewed.gif
>

Looks just fine.

Thanks
John


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.668 / Virus Database: 430 - Release Date: 24/04/04



Arachne at FreeLists
-- Arachne, The Web Browser/Suite for DOS and Linux --

Other related posts: