• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - davem

1
Help & Questions / Size of ImagingCanvas?
24 May 2012, 11:23:39
Hi
is it possible to find out the width and height of an ImagingCanvas?

And second question - if I want to create a visual effect on an image with partial transparency (for example the corners fading to black or white), what approach do you suggest? I assume merging two images somehow?

And last question - what is the difference between DrawAlpha and DrawBlend?

   Thanks, David
2
Help & Questions / JPG Resolution
1 November 2011, 11:44:59
Do I understand from this topic http://galfar.vevb.net/imaging/smf/index.php/topic,283.0.html that the library supports the print resolution of JPEGs (in pixels per inch or pixels per cm)? How to set it up? Thanks!
3
Bugs And Other Insects / Two small bugs
1 November 2011, 11:09:25
  Hi,
  I have just installed the latest working version and found two small issues on delphi 2009 / Win 7 (they raise errors during compilation):

ImagingUtility.pas ([DCC Error] ImagingUtility.pas(1529): E2003 Undeclared identifier: 'Result')
Code (delphi) Select

{$IF Defined(DELPHI)}
  {$IF CompilerVersion >= 23}
  FloatFormatSettings := TFormatSettings.Create('en-US');
  {$ELSE}
  // FloatFormatSettings := GetLocaleFormatSettings(1033, Result);  // 1.11.2011
   GetLocaleFormatSettings(1033, FloatFormatSettings);
  {$IFEND}
{$ELSE FPC}
  FloatFormatSettings := DefaultFormatSettings;
  FloatFormatSettings.DecimalSeparator := '.';
{$IFEND}


ImagingRadiance.pas ([DCC Error] ImagingRadiance.pas(359): E2033 Types of actual and formal var parameters must be identical)
Code (delphi) Select

  procedure EncodeRgbe(const Src: TColor96FPRec; var Dest: TRgbe); {$IFDEF USE_INLINE}inline;{$ENDIF}
  var
    V, M: Extended; // {$IFDEF FPC}Float{$ELSE}Single{$ENDIF}; // 1.11.2011
..
      Frexp(V, M, E);     // 1.11.2011, here it used to report the error for M variable (


In both cases I did a correction, hopefully they are fine (see my comment 1.11.2011)

Apart from that I also get this warning: [DCC Hint] ImagingRadiance.pas(366): H2445 Inline function 'ClampToByte' has not been expanded because its unit 'ImagingUtility' is specified in USES statement of IMPLEMENTATION section and current function is inline function or being inline function

4
Bugs And Other Insects / Freeze on loading a JPG
26 November 2010, 11:25:07
  Hi,
  I got two examples of JPG files that make the loading freeze. They are corrupt however the library should not freeze and rather return an error or load the image incomplete (like Windows preview does). I use version 0.264. Can you help me please?

Delphi 2009
Win 7 64bit, Win XP

  Thanks, David

Ps: I sent a small donation today  ;)
5
  Hi,
  I got a weird problem. When saving JPG, the saved file has about double the size in comparison with other programs. I tried the "standard" TJpegImage and Paint Shop Pro and both save about the same file size (with the same image source, same resolution of output, same quality and progressive flag on). When saving the same using vampyre, I have to set quality to about 70 to produce a file with comparable size but then the image is obviously ugly. Any idea??

   Thank you, David
6
  I got very interesting problem. I manipulate an image using TImageData however then I need to add a text and modify a few pixels manually. So I do this:

        ImgBitmap:=TImagingBitmap.Create;
        ImgBitmap.AssignFromImageData(MainImage);

        // add text (just an example)
        ImgBitmap.Canvas.TextOut(x,y,'some text');

        // set some colors (just an example)
        ImgBitmap.Canvas.Pixels[x,y]:=col;

        // save the changes back to ImageData
        ImgBitmap.AssignToImageData(MainImage);
        ImgBitmap.Free;

  However, my problem is that in some cases (let's say every fifth case) the changes of colors are not visible on the picture when I save it. It seems to me that the Canvas/Handle hasn't been updated yet at the moment I assign the bitmap back to ImageData. Sometimes the part of the image is even partially black. Does anyone have any idea what can be done? I tried to put sleep behind, I tried to use a CriticalSection (it is multithreading appl), I tried to Lock the canvas (although the ImgBitmap is not shared) however nothing works. I also tried to run only one thread but it was the same. Does anyone have any idea?
7
Help & Questions / Quality of resizing
19 April 2010, 21:37:22
  Hi,
  first of all thanks for the great library!!

  However I got a problem resizing images because I always get rectangles in areas with the same or very similar color (such as the sky, wall etc). The rest of image (for example faces) are perfect. I used bicubic filter, I also tried to change the hardcoded value in the following code (in Imaging.pas, line 2334) to use other filters (sfGaussian, sfLanczos, sfMitchell) but the only difference was that the size of the rectangles has changed a little.

        rfBicubic: StretchResample(WorkImage, SrcX, SrcY, SrcWidth, SrcHeight,
          DstImage, DstX, DstY, DstWidth, DstHeight, sfCatmullRom);

Am I doing something wrong or is this a bug? I used to use the attached unit in the previous versions of my program and that one produces much better results (you can compare, all attached).

Source: JPEG (from a camera)
Resolution: 13 MPix

The original picture is too large so you can get it from here: http://www.ildam.cz/foto/IMG_3692.JPG

  Please help!

   Thanks, David
8
Hi,
thanks for this great library!!!!!! Would it be possible to add support of RAW??

  Thank you, David
SMF spam blocked by CleanTalk