Recent Posts

Pages: [1] 2 3 4 ... 10
1
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
2
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.
3
Bugs And Other Insects / Problem for 64bit
« Last post by Phoenix on 17 February 2018, 14:27:48 »
Hello,

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:
imzutil.pas

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).

example
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)

Thanks
4
Help & Questions / Re: Convert png with transparency to a bitmap
« Last post by Phoenix on 7 February 2018, 19:42:52 »
Hello,
Thanks for the reply  :)!
So it is not possible, replace the "transparent color" during the conversion to make the process faster  :(.
5
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;
var
  I, Width, Height, ExistingLevels: LongInt;
begin
  FreeImagesInArray(Images);
  SetLength(Images, 0);
  Result := False;
  if Byte(glIsTexture(Texture)) = GL_TRUE then
  begin
    // 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
      begin
        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, @Width);
        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, @Height);
        MipLevels := GetNumMipMapLevels(Width, Height);
      end;
6
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...
7
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.
8
Help & Questions / Re: Convert png with transparency to a bitmap
« Last post by Galfar on 6 February 2018, 03:10:03 »
If I understand it correctly, you need to create one image and fill it with your desired background color. Then load your PNG to another image and draw it over the first image with alpha blending. Finally, save the result to a bitmap. 
9
It's not very different but the the end result does not work yet :( There are crashes that I have not yet figured out.

What works fine in MacOS now is dynamic linking to libtiff like in Linux. It's not enabled by default though
since I guess not many Mac users have libtiff installed (contrary to Linux situation).
10
Bugs And Other Insects / Error: Can't open object file: libtiffpack-win32.a
« Last post by Windows User on 4 February 2018, 13:50:47 »
I am using the newest version of Vampyre Imaging on Windows 7 with Lazarus 1.6.4. (32 bit).

When adding the package to my project and trying to compile, I get the following errors:

lazarus.pp(154,1) Warning: Library libtiffpack-win32.a not found, Linking may fail !
lazarus.pp(154,1) Error: Can't open object file: libtiffpack-win32.a

Obviously, Lazarus cannot find the libtiffpack-win32.a located in \Extras\Extensions\LibTiff\Compiled.

I have tried the LCLImager Demo and it is working there. I saw that there ";..\..\..\Extras\Extensions\LibTiff\Compiled" is added to the "Compiler Options > Libraries (-FI)" while the package itself has no link to the Compiled folder at this point. However, when adding ";..\..\..\Extras\Extensions\LibTiff\Compiled" to the package compiler options, it is not working, too. Or am I missing something at this point?

When creating a new project and adding ";..\..\..\Extras\Extensions\LibTiff\Compiled" to the project options, it is compiling and Lazarus finds libtiffpack-win32.a. When omitting this, I get the error. But also the IDE is not compiling anymore, there I get the same error "Can't open object file".

I think the package is missing a link or include to the Compiled folder at some point. However, I have not enough expertise to fix this on my own. Can you help me?
Pages: [1] 2 3 4 ... 10