View Issue Details

IDProjectCategoryView StatusLast Update
0001817JEDI VCL00 JVCL Componentspublic2004-06-04 01:08
ReporterwdonkerAssigned Touser72 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001817: Access violation when using SetBitmapPixelFormat
DescriptionWhen changing BitMapPixelFormat from 24bit to 8bit an access violation occurs in function BitmapToMemoryStream.
This is because variable ImageSize is not adjusted to the new, smaller size of the Bitmap.
Additional InformationThis bug was also present in RxLib.
Possible fix is in the attached version of JvGraph.
TagsNo tags attached.

Relationships

related to 0003237 resolvedremkobonte 0001817: Access violation when using SetBitmapPixelFormat 

Activities

2004-05-31 03:00

 

JvGraph.pas (46,349 bytes)

user72

2004-05-31 23:57

  ~0004417

FYI, this function is now in JvJVCLUtils (JVCL3)

user72

2004-06-01 00:03

  ~0004418

There is already a similar fix in the JvJVCLUtils version that I think accomplishes the same thing:

... // at the end:
      Result := TMemoryStream.Create;
      try
        Result.Write(P^, Length);
        if SourceBitmapFormat = pfDevice then
          Result.Write(Bits^, ImageSize)
else
          Result.Write(Bits^, ImageSize div 3);

        Result.Position := 0;
      except
        Result.Free;
        raise;
      end;

wdonker

2004-06-03 09:14

reporter   ~0004453

Ok, that's the one. Consider the bug fixed.

Issue History

Date Modified Username Field Change
2004-05-31 03:00 wdonker New Issue
2004-05-31 03:00 wdonker File Added: JvGraph.pas
2004-05-31 23:57 user72 Note Added: 0004417
2004-06-01 00:03 user72 Note Added: 0004418
2004-06-03 01:15 user72 Status new => feedback
2004-06-03 09:14 wdonker Note Added: 0004453
2004-06-04 01:08 user72 Status feedback => resolved
2004-06-04 01:08 user72 Resolution open => fixed
2004-06-04 01:08 user72 Assigned To => user72
2005-09-27 14:37 remkobonte Relationship added related to 0003237