| 
Rank: Newbie
 Groups: Guest
Joined: 5/8/2017(UTC)
 Posts: 5
 
 | 
            
	      
                Hi,  to make image lighter i apply following Levels transform,  which is good with RGB , but failing if image is CMYK   {Format32bppCmyk}  Code:         
using (var image = new Aurigma.GraphicsMill.Bitmap(in_file))
            {
                image.ColorAdjustment.Levels(0, 1, 0, (float) 1.2, 1, HistogramMode.Sum);
            }
 Code:Aurigma.GraphicsMill.UnsupportedPixelFormatException was unhandled
  HResult=-2146233088
  InnerSource=Levels: 3
  Message=The specified pixel format is not supported.
  Source=Aurigma.GraphicsMill
  StackTrace:
       в Aurigma.GraphicsMill.PipelineElement.RunPipeline()
       в Aurigma.GraphicsMill.Pipeline.Run()
       в Aurigma.GraphicsMill.Pipeline.Run(Pipeline pipeline)
       в Aurigma.GraphicsMill.Transforms.Transform.Apply(Bitmap source)
       в Aurigma.GraphicsMill.ColorAdjustmentProvider.ApplyAndDeleteTransform(IBitmapTransform transform)
       в Aurigma.GraphicsMill.ColorAdjustmentProvider.Levels(Single minimumLevel, Single maximumLevel, Single shadows, Single midtones, Single highlights, HistogramMode histogramMode)
       в WindowsFormsApplication5.Form1.button2_Click(Object sender, EventArgs e) в C:\Users\thele\Documents\Visual Studio 2015\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Form1.cs:строка 88
       в System.Windows.Forms.Control.OnClick(EventArgs e)
       в System.Windows.Forms.Button.OnClick(EventArgs e)
       в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       в System.Windows.Forms.Control.WndProc(Message& m)
       в System.Windows.Forms.ButtonBase.WndProc(Message& m)
       в System.Windows.Forms.Button.WndProc(Message& m)
       в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       в System.Windows.Forms.Application.Run(Form mainForm)
       в WindowsFormsApplication5.Program.Main() в C:\Users\thele\Documents\Visual Studio 2015\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Program.cs:строка 19
       в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
 please advise , how can it be done? |