ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 White rows on black background

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jenswahl Posted - Feb 23 2012 : 01:16:30
Hello,

I have the following problem:
I want the background of a TImageEnView (in example: ievPict) to fill with a special color, e.g. clBlack. I do this so:

ievPict.Clear;
ievPict.Proc.Fill(slbColor.Color); //slblColor is a TsListBox

This works fine.
But if I load an image with hasn't the same ratio like ievPict (ievPict.AutoFit must be True) then I get above and under the bitmap
a WHITE row:

strPict.Seek(0, soFromBeginning); //strPict is a TStream
ievPict.IO.LoadFromStream(strPict);
ievPict.Update;

How can I get this rows in my wanted color?
I tried some with LayersMergeAll and others but without a wanted result.
I'm using Release 3.1.2.

Kind Regards

Jens

9   L A T E S T    R E P L I E S    (Newest First)
jenswahl Posted - Feb 24 2012 : 02:10:06
Thank you, fabrizio,

my mystake was the false seuqence: I firstly set the Background and after them I loaded the image.
Now it works fine.
fab Posted - Feb 24 2012 : 01:40:14
This image hasn't a background, so if you set TImageEnView background to black you will not see white bands. For example:

ImageEnView1.IO.LoadFromFile('201222404134_ieforum.jpg');
ImageEnView1.BackgroundStyle := iebsSolid;
ImageEnView1.Background := clBlack;
jenswahl Posted - Feb 24 2012 : 00:41:58
Hi Fabrizio,

I attached the image.

fab Posted - Feb 24 2012 : 00:04:21
Please could you post this image?
jenswahl Posted - Feb 23 2012 : 23:33:53
Sorry, I meant Fabrizio!

Jens.
jenswahl Posted - Feb 23 2012 : 23:31:10
Hi Nigel,

thank you for your suggestion but it doesn't works.
The images are *.jpg embedded in mp3-files (an image of the album-cover) and will be shown using LoadFromStream.
The most images have a size of 600x600 pixels (an so my ImageEnView-object), but the one showed in my first post has only 600x537 pixels.
I use the following settings for ImageEnview1:
Autocenter = True, LegacyBitmap = False, AutoFit = True,
AutoShrink = False, AutoStretch = False, ZoomFilter = rfBell

Jens
fab Posted - Feb 23 2012 : 13:44:39
Hi Jens,
are you sure that the white background is not part of the loaded image?
If this is the case you could try to remove the white border with:

ImageEnView1.Proc.AutoCrop(10, CreateRGB(255,255,255));

BTW: CreateRGB is defined in imageenproc unit.
jenswahl Posted - Feb 23 2012 : 06:24:11
Hi Nigel,

I want to set the color of the two white rows and this is the background of the loaded image (I think).
Setting the background of the TImageEnView-Object works till I load an image.

Jens.
xequte Posted - Feb 23 2012 : 01:29:58
Hi Jens

Can you tell us more about your intention with this?

Are you looking to set the background color of the whole TImageEnView (c.f. ImageEnView.Background := clRed;) or just the background of the loaded image?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com