Recent Posts

Pages: [1] 2 3 4 ... 10
Suggestions, Feature Requests, Contributions / 16 bit floating point
« Last post by JernejL on 22 March 2018, 14:19:50 »
I wish to share this find with galfar and the rest here, it's related to processing 16 bit floating point values:
There is already a pascal implementation of this that i have found:
I hope you find it useful, surely a lookup table based solution with no cpu code branching is a big improvement if you process 16 bit floating point values regularly.
I would like to know if you have thought of these content yourself and can you help me understand more?
Help & Questions / Re: Problem by ImSaveImageToFile
« Last post by Awareness on 26 February 2018, 04:25:38 »
Learn more and learn how to find other channels. Can you recommend this knowledge?
Help & Questions / Re: Animated PNG (APNG)
« Last post by Thomusnut on 19 February 2018, 09:22:47 »
I think it's a really good animation. I really like it
Open Discussion / Re: Imaging on FPC is Slower than on Delphi
« Last post by Thomusnut on 19 February 2018, 09:22:07 »
I agree with you that it's slower. It's really slow I hope it will be a good one.
Bugs And Other Insects / Problem for 64bit
« Last post by Phoenix on 17 February 2018, 14:27:48 »

I found a problem using the latest version of lazarus (1.8.0 64bit FPC 3.0.4) in debug mode. On Windows 10 64bit.

In the imjmorecfg.pas file I saw:

Code: Delphi
  1. uInt = Cardinal;

This I think is a problem for 64bit systems

For FPC if I replace with
uInt = NativeUInt
I do not perform more dangerous crashes

Also I think there is a similar problem (I have not tested) for:

uInt = cardinal; -> NativeUInt
ptr2int = uInt; -> PtrUInt
(but the message "Nomssi" under "ptr2int" is not very clear)

I noticed that through the lazarus compiler, several "warning" and "hint" messages appear.
For "justified Hints" it is possible to disable them (to avoid having to run many already verified messages).

Code: Delphi
  1. FillChar(TmpInfo, SizeOf(TmpInfo), 0);
show variable message not initialized
it is due to the use of "var" but here it is correct then
Code: Delphi
  1. FillChar({%H-}TmpInfo, SizeOf(TmpInfo), 0);
avoid the message (it is filtered by lazarus itself)

Finally, the compilation on the ImagingPcx.pas unit is blocked
Code: Delphi
  1. ifMono: TImageFormat = TImageFormat (250);
I do not know if it's correct.
I know that the SizeOf () dimension of the "enum" types can change depending on the number of elements.
The compiler writes:
ImagingPcx.pas(91,43) Error: range check error while evaluating constants (250 must be between 0 and 206)

(sorry for my English)

Help & Questions / Re: Convert png with transparency to a bitmap
« Last post by Phoenix on 7 February 2018, 19:42:52 »
Thanks for the reply  :)!
So it is not possible, replace the "transparent color" during the conversion to make the process faster  :(.
Bugs And Other Insects / Possible bug in CreateMultiImageFromGLTexture of ImagingOpenGL.pas
« Last post by Johannes on 7 February 2018, 02:42:04 »
I have looked into the code of ImagingOpenGL.pas and found something weird:

Code: [Select]
function CreateMultiImageFromGLTexture(const Texture: GLuint;
  var Images: TDynImageDataArray; MipLevels: LongInt; OverrideFormat: TImageFormat): Boolean;
  I, Width, Height, ExistingLevels: LongInt;
  SetLength(Images, 0);
  Result := False;
  if Byte(glIsTexture(Texture)) = GL_TRUE then
    // Check if desired mipmap level count is valid
    glBindTexture(GL_TEXTURE_2D, Texture);
    if MipLevels <= 0 then
      MipLevels := GetNumMipMapLevels(Width, Height);  //<- Here it tries to access uninitialized memory (Line 849)
    SetLength(Images, MipLevels);

A possible fix would be:
Code: [Select]
    if MipLevels <= 0 then
        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, @Width);
        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, @Height);
        MipLevels := GetNumMipMapLevels(Width, Height);
Bugs And Other Insects / Re: Error: Can't open object file: libtiffpack-win32.a
« Last post by Mac User on 6 February 2018, 14:04:34 »
If you just add only the library file (lpk) to a blank Lazarus project as it is (without changing any library or unit paths), you get the following error:

ImagingTiff.pas(42,3) Fatal: Cannot find ImagingTiffLib used by ImagingTiff.

I think there is just missing a dependency within the package. But I cannot find where and how to fix it...
Suggestions, Feature Requests, Contributions / Re: libtiff 3.9.4 extension for fpc.
« Last post by Mac User on 6 February 2018, 13:38:01 »
Very good to hear that you are working on a solution.

Yes, I think so, too. Then it is much better to use the solution like Windows than relying on an external library.
Pages: [1] 2 3 4 ... 10