unidrv windows printer driver plugin(bitmap.dll) sample source changes colors? - printing

Using unidrv windows printer driver plugin(BITMAP.dll) sample source,
I can install and print color image to file (/w Print2file port).
but printed color is different with my original color.
For example,
original color (lime.bmp) is RGB(181,230,29), printed color(lime_prted.bmp) is RGB(175,228,23).
original(lime.bmp) and printed color(lime_prted.bmp).
I didn't change any code from 'unidrv-based bitmap rendering plug-in and bitmap.gpd'
ImageProcessing of bitmap.dll plugin do just CopyMemory.
No color changing in ImageProcessing.
No color profile.
Who changes color?
////////////////////////////
I tried to add
*ChangeColorModeOnDoc?: FALSE
*EnableGDIColorMapping: FALSE
in bitmap.gpd.
No effect.
color changed.
////////////////////////////note ////////////////////
BITMAP
A Unidrv-based bitmap rendering plug-in. This sample demonstrates how to write a Unidrv-based rendering plug-in that functions as a bitmap driver.
https://github.com/microsoft/Windows-driver-samples/tree/main/print/OEM%20Printer%20Customization%20Plug-in%20Samples/C%2B%2B/bitmap
The IPrintOemUni::ImageProcessing method can be used with Unidrv-supported printers to modify image bitmap data
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/prcomoem/nf-prcomoem-iprintoemuni-imageprocessing

Related

How to plot correct pdf from embed image dwg

Please tell me how to plot correct pdf from embed image dwg.
I am evaluating Design Automation plot from the dwg with enbed image.
I recieved black filled dwg on below condition.
Dasign Automation API version:v2
AppPackage:PlotToPDF
DWG:rasterTest.dwg
AutoCAD version: 23.0(P.45.Z.36)
Also I tried my original plot apppackage,
and the result was the pdf filled black .
The default PlotToPDF activity is defined as follows:
_tilemode 0 -export _pdf _all result.pdf\n
This means it only plot paperspace. This drawing has no initialized paperspace layouts. You can do 2 things.
Use a different script that plots the current space.
AutoCAD PDF (General Documentation).pc3
e:\test.pdf
_N
_Y
Resave the drawing so that it has an initialized layout.

VCL RichEdit componet which will load table background

I am using C++ Builder XE2.
I wish to use a RTF file to load a template into a rich edit file so I can change marked strings eg $DATE$.
I have tried both TRichEdit and TJvRichEdit and can do the string replace no problem.
TJvRichEdit also load bmp and JPG which is what I want.
However when I load an RTF file generated in word or wordpad which has cell background colour I get the formatting but not the background colour.
I had a look at the RichView componet (WHich is quite expensive for a single component ($330US).
This loads the background colour but loses the font sizing (Seems to apply its own paragraph style rather than keeping the RTF paragraph file.
Does anyone know of a decent RichText component which will load from rtf file and keep both text formatting as well as the table background and also allow image loading.
Would prefer a free componet or at least reasonable price component < $100 US.

Inkscape - Change SVG color using command line tool

Is it possible to change color of an SVG file to a single color, using inkscape on the command line?
For example, I have an SVG document with different colors like '#ffffff', '#004883', '#e32934'.
So with a command line tool is it possible to change this Pepsi logo to a single color file. I mean the the Pepsi logo should be completely in the red OR blue color.
If it's not possible with inkscape, is it possible with any other open source library (command line tool) for Linux? Thanks in advance.

What format are the images in the delphi IDE menu?

I'm adding a new entry to the main menu of the Delphi IDE (Delphi 2007) and a bmp image to the image list associated to the menu (without passing a mask as parameter)
IDEMainMenu.Images.Add(Image,nil);
but the image added is not shown with a transparent color , i tried using a 8 and 24 bits bmp and using fucsia as the background color but the ide always display the icon with the background. so the question is which is the color depth of the bmp images which i must use and the color of the backgrpund to make appear the image transparent in the delphi ide menu? or i need pass a mask bmp to the Images.Add function?
try using the icon format (.ico) instead, size 16x16 and 256 colors.
this is the code which I use, the MainMenu is the instance to the IDE menu item.
Image:=TIcon.Create;
try
Image.Handle := LoadIcon(hInstance, sLogo16);
ExplorerItem.ImageIndex:=MainMenu.Images.AddIcon(Image);
finally
Image.Free;
end;

Which script editor can code-color hex color values?

I frequently work with lots of hexadecimal color values in my programs. Is there a script editor that can code-color the color values, based upon the colors they describe? .. (eg #FF0000 should be colored RED and 0x00FF00 should be colored GREEN)
The text editor UltraEdit has since version 20.00 the CSS color tooltip feature which is described as follows by IDM Computer Solutions, Inc.
Hovering cursor over a supported color definition causes a color "swatch" to be displayed. Users can CTRL+CLICK on "swatch" to invoke OS color picker to select a new color.
"Display CSS color tooltips" Configuration option added under Advanced -> Configuration -> Editor Display -> Miscellaneous
Detects and supports colors defined in the following formats:
Hex RGB
Functional notation RGB
RGBA
HSL
HSLA
Tooltips supported in the following file types:
HTML
CSS
Javascript
PHP
Perl
Python
Ruby
This feature does not syntax highlight the color value itself in the text file with the color according to the value. But it displays the color in a rectangle below the mouse pointer when mouse pointer is positioned over a color value in one of the supported formats.
So this feature of UltraEdit is not exactly what have been asked for, but is perhaps nevertheless very helpful for you.
In my point of view it does not really make sense to syntax highlight the color value itself in the color according to the value as this results most likely quite often in not visible or hard to see values. For example think about color value white with using white as text background color. Lots of combinations of text and background colors make the text very hard to read.
SynWrite editor can do it. #RRGGBB or rgb(rr, gg, bb) fragments are hilited.

Resources