UseJPEGImageDecoder() UseTIFFImageDecoder() UseTGAImageDecoder() UsePNGImageDecoder() ;Fast operations for 24-bit max 8192x8192 images only Dim Colors.a(256,256,256) FileName$ = OpenFileRequester("Select image for calc colors.", "", "Images|*.bmp;*.jpg;*.tga;*.png;*.tif",0) If LoadImage(0, FileName$) = 0 Or ImageDepth(0) <> 24 End EndIf StartDrawing(ImageOutput(0)) *Color.Ascii = DrawingBuffer() *Overflow = *Color + ImageWidth(0) * ImageHeight(0) * 3 While *Color<*Overflow If State = 0 First = *Color\a State + 1 ElseIf State = 1 Second = *Color\a State + 1 Else Colors(First, Second, *Color\a) = #True State = 0 EndIf *Color = SizeOf(Ascii) Wend StopDrawing() For a = 0 To 255 For b = 0 To 255 For c = 0 To 255 If Colors(a,b,c) Count + 1 EndIf Next Next Next MessageRequester("Colors.", Str(Count))
Вылетает и пишет чтение с адреса 1. Где косяк? Purebasic 6.12