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
 Flip horizontal

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
pierrotsc Posted - Mar 09 2018 : 09:53:58
When you load a 16 bit image and flip it horizontally, the image becomes black.
Best
Pierre

attach/pierrotsc/20183995351_16bitDONE-arrow.zip
33.99 KB
18   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 22 2018 : 19:03:42
Hi

We've added flipping support for all pixel formats in the coming update. You can email me for a pre-release.


Nigel
Xequte Software
www.imageen.com
pierrotsc Posted - Mar 13 2018 : 14:44:32
I am attaching a photo I shot of my daughter in law. It came from a raw image and it is 16 bit. That may help you.
Best

attach/pierrotsc/201831314444_liz.zip
1797.85 KB
pierrotsc Posted - Mar 13 2018 : 11:38:48
That is true..it does show 48 bit in the preview. I guess it is 3x16 per channels.
It was created from scratch in Photoshop. I could also upload one of my raw 16 bit image but it also show 48 bit.
w2m Posted - Mar 13 2018 : 11:36:23
Yes, i know. That's why I sent it to Nigel to look at. Rarely do I work with NativePixelFormat except for special circumstance in just a few projects. I do not to think you can not apply proc functions to 16 bit NativePixelFormat images according to the help file shown below because use of NativePixelFormat will prevent execution of some image processing operations:

property NativePixelFormat: Boolean;

Description

By default, ImageEn converts all paletted images to 24 bit (true color). Only black/white images are stored in the original format with 1 bit per pixel.
Setting NativePixelFormat to True disables the conversion and uses the image's native format.

Notes:
- Use of NativePixelFormat will prevent execution of some image processing operations
- Setting ImageEnView1.IO.NativePixelFormat is the same as setting ImageEnView1.IO.Params.NativePixelFormat
- LegacyBitmap must be False to enable NativePixelFormat

If the help file is correct and I believe it is, then Nigel will have to come up with a way to achieve this.

I also do not understand why the demo shows RGB48-bit when your 16 bit image is loaded. This does not make sence to me.
if ImageEnView1.IO.Params.BitsPerSample *
ImageEnView1.IO.Params.SamplesPerPixel = 32 then
StatusBar1.Panels[4].Text := 'Colors: RGBA-32Bit'
else
StatusBar1.Panels[4].Text := 'Colors: RGB-' +
IntToStr(ImageEnView1.IO.Params.BitsPerSample *
ImageEnView1.IO.Params.SamplesPerPixel) + 'Bit';

The above code should return RGB16-bit but it returns RGB48-bit with your image.
Did you create your image with ImageEn and is it truly 16 bit?

Bill Miller
Adirondack Software & Graphics[/b]
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Mar 13 2018 : 11:17:46
If you check the box, then open an image (16 bit), i get the program to crash..
Thanks
w2m Posted - Mar 13 2018 : 10:41:36
Nigel,

I reviewed and updated the demo for your testing if you wish. I added a checkbox to toggle NativePixelFormat.
attach/w2m/2018313104128_MultiframePSD.zip
59.98 KB

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Mar 12 2018 : 20:38:44
Hi

We are investigating...

Nigel
Xequte Software
www.imageen.com
pierrotsc Posted - Mar 12 2018 : 15:52:25
Ok,i was able to duplicate it.
Add that
ImageEnView1.IO.NativePixelFormat := true;

Then when you flip, it becomes black..
xequte Posted - Mar 12 2018 : 14:55:55
Thanks Bill

Nigel
Xequte Software
www.imageen.com
w2m Posted - Mar 12 2018 : 11:13:13
All ImageEn proc methods operate on the selected layer including ImageEnView1.Proc.Flip(fdHorizontal);

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Mar 12 2018 : 11:12:43
no problem..
w2m Posted - Mar 12 2018 : 11:03:03
Change the delete button code to this:
procedure TForm1.Delete1Click(Sender: TObject);
{ Delete the selected layer. }
begin
  ImageEnView1.LayersRemove(ImageEnMView1.SelectedImage);
  ImageEnMView1.DeleteSelectedImages;
  ImageEnView1.Bitmap.Modified := True;
  UpdateGUI;
  UpdateStatusbar;
end;

This demo flips the selected layer.
This demo is not fully tested. There may be other code that needs modification.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Mar 12 2018 : 10:59:22
Thank you very much..Let me load it..
Best
w2m Posted - Mar 12 2018 : 10:47:59
Here is a demo that flips psd.

attach/w2m/201831210463_MultiframePSD.zip
102.26 KB
In this example your file is opened and PSD_LoadLayers is True and the image can be flipped. When loading psd files with layers, the selected layer is flipped.
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Mar 12 2018 : 10:17:11
You are indeed correct. I loaded it with photoen3 and it worked but i used another onlime demo last and it did not. So i guess It is a code issue.
Thanks for testing.
Appreciate it.
Pierre
w2m Posted - Mar 12 2018 : 10:11:55
If it does not work for you then you have some code that is causing the problem because it works here.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Mar 12 2018 : 10:09:18
When i open the file in Photoshop, it only has one layer.
I will check your code to see if it fixes the issue.
Thanks
w2m Posted - Mar 12 2018 : 10:06:42
Your image contains layers so flip is not working. If you load the image without layers the image is flipped correctly and is not all black:

{ Change PSD_LoadLayers to False to load the base image without layers }
{ Call this before loading the image }
ImageEnView1.IO.ParamsFromFile(AFilename);
if ImageEnView1.IO.Params.FileType = ioPSD then
begin
  ImageEnView1.IO.Params.PSD_LoadLayers := False;
  ImageEnView1.IO.LoadFromFilePSD(AFilename);
  ImageEnView1.Proc.Flip(fdHorizontal);
end;

if PSD_LoadLayers is true and the image is flipped, the image is not flipped and the arrow remains visible and is not black.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development