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
 After saving JPEG with ioJPEG_RGB this JPEG loads with red and blue inverted

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
Gijs-albelli Posted - Apr 01 2022 : 09:27:26
The code below demonstrates the problem. This happens with ImageEn 10.3.5

You can load a JPEG file in ImageEnViewOriginal, when you save this file in a new name with
ImageEnViewOriginal.IO.Params.JPEG_ColorSpace := ioJPEG_RGB;

and you load this file in the other ImageEnViewCopy, the red and blue are converted.

Is this a bug? Or can we work around it. We are planning to upgrade our ImageEN components but this is a show stopper for us.



unit uFormMain;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.ComCtrls, hyiedefs,
  hyieutils, iexBitmaps, iesettings, iexLayers, iexRulers, iexToolbars,
  iexUserInteractions, imageenio, imageenproc, ieview, imageenview, Vcl.ExtDlgs,
  Vcl.StdCtrls;

type
  TFormMain = class(TForm)
    PanelLeft: TPanel;
    StatusBar1: TStatusBar;
    Splitter1: TSplitter;
    PanelClient: TPanel;
    PanelLeftTop: TPanel;
    PanelClientTop: TPanel;
    ImageEnViewOriginal: TImageEnView;
    ImageEnViewCopy: TImageEnView;
    OpenPictureDialog: TOpenPictureDialog;
    ButtonLoad: TButton;
    ButtonSaveAsAndLoad: TButton;
    procedure ButtonLoadClick(Sender: TObject);
    procedure ButtonSaveAsAndLoadClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormMain: TFormMain;

implementation

{$R *.dfm}

procedure TFormMain.ButtonLoadClick(Sender: TObject);
begin
  if OpenPictureDialog.Execute then
  begin
    ImageEnViewOriginal.IO.LoadFromFile(OpenPictureDialog.FileName);
    ButtonSaveAsAndLoad.Enabled := True;
  end;
end;

procedure TFormMain.ButtonSaveAsAndLoadClick(Sender: TObject);
var
  folder,
  uniqueName,
  extension,
  newFileName: string;
begin
  folder := ExtractFilePath(OpenPictureDialog.FileName);
  uniqueName := TGuid.NewGuid.ToString();
  extension := ExtractFileExt(OpenPictureDialog.FileName);
  newFileName := folder + uniqueName + extension;
  ImageEnViewOriginal.IO.Params.JPEG_ColorSpace := ioJPEG_RGB;  // this causes the invert of red and blue while loading
  ImageEnViewOriginal.IO.SaveToFileJpeg(newFileName);
  ImageEnViewCopy.IO.LoadFromFileJpeg(newFileName);
end;

end.



1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 03 2022 : 19:04:05
Thank you. This is fixed in the current beta. You can email us for it you like.

Nigel
Xequte Software
www.imageen.com