![]() ![]() In suitable circumstances possibly another way of batch converting images to have transparency, and possibly better as a script that can be reused directly anytime.Ĭday wrote:That problem doesn't arise with the GUI solutions you posted, I presume. I imagine that there are probably alternative, and possibly better, NConvert solutions using the available code options above. That problem doesn't arise with the GUI solutions you posted, I presume. Even when the background colour was 255 255 255, the paletted value wasn't pure white. It seemed to be necessary to determine the actual paletted colour in a test conversion so that that value could be set, the actual value depending on the bit depth valued entered. That seemed to work well for the letters I tested initially which were black and white scans (so no need to use 256 colours really) but failed when I tested a colour scan: the problem seemed to be that when the image was converted to paletted colour, nominally white canvas wasn't converted to pure white even when I reduced the colour depth right down to 8 colours. At a quick look the following options support transparency:Ĭode: Select all nconvert -32bits -colors 256 -transpcolor 255 255 255 *.PNG That could be useful if the need arose regularly, although that isn't my present use case. Having converted a letter and now done a further test I'm not sure if the result is actually better.Īfter posting yesterday, as an afterthought I checked the NConvert help file and found that it might be possible to create a batch file that would convert scans to transparent in a single operation. I'd done some tests using layers in Paint.NET which I've worked with a little recently, but then wondered if starting with a transparent foreground image of the letter might produce a better result, or have other advantages. I thought it might look better if the passages to be marked were highlighted by a single coloured block. My considered use case arises directly from my freely-admitted perfectionist personality trait: I need to prepare a file containing copies of a series of letters in which carefully selected text is highlighted I could of course easily use the highlighting tool in Adobe Acrobat, but I noticed that it can leave gaps between the lines marked. Thank you for your customary detailed response: not only possible, but a choice of methods. IDUX: What Are Index and Alpha Please let me know if I forgot about something!.Jesse O'Chapo: Developers Guide to Images.1 through 254 = gray mask = semi-transparent (translucent).0 = 100% black (R0/G0/B0) mask = fully transparent.This command adds a uniform alpha channel to an image: XnView Classic: Add alpha ( Tools → Batch Processing.You then need to specify the index number of the color you'd like to be (fully) transparent. The color depth of the input images has to be (reduced to) 8-bit (256 colors) or less for this method to work. XnView Classic: Set the transparency value to palette entry ( Tools → Options.This method basically works like the Fi lter → PhotoMasque add-on: You have to prepare a (grayscale) mask which is then “superimposed” on the input images. ![]() Supported output formats: BMP, ICO, PNG, TGA, … → Actions » Add action → Image → Add mask: mask.png)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |