How to separate image from alpha using Quartz Composer?
Cross posting here and in the developers forums... (sorry for any duplication - also posting to the QC mail list)
I'm attempting to construct a Quartz Composer composition that will take an image containing transparency, and — within the structure of that composition — disect the image so that I can perform separate operations on the alpha mask and the full image (i.e. as if the mask did not exist). This would be akin to opening a PNG or TIFF in GraphicConverter, then accessing the images I want via Show Alpha Channel and Remove Alpha Channel.
I'm able to easily access the alpha channel by applying a Color Martix patch to the image, but I can't seem to figure out how to get to the full "unmasked" image.
Can anyone nudge me in the right direction as to how I could remove the alpha mask from an image?
Thanks!!
John
Hi John,
You could use the Core Image Filter to extract the Alpha channel as a mask, and then other filters to use that mask.
In the 'Settings' pane of 'Patch Inspector' for the 'Core Image Filter' place the following Core Image Kernel routine code:
A Core Image kernel routine
Alpha to Mask White Opaque, Black Transparent
kernel vec4 alphaToBlackWhite(sampler image)
vec4 pixelValue = sample(image, samplerCoord(image)); // Get a pixel
unpremultiply(pixelValue);
pixelValue.r = pixelValue.a; // Red channel
pixelValue.g = pixelValue.a; // Green channel
pixelValue.b = pixelValue.a; // Blue channel
pixelValue.a = 1.0; // Alpha Channel make Opaque
return premultiply(pixelValue);
Alternatively you could rewrite the above Kernel, more details on writing Core Image Kernels is in the developer documentation 'Image Tutorial: Writing Kernels'
Hope this helps,
Neil.
Similar Messages
-
How to copy images from another MC in reversed order??
Hi everyone,
I'm new to AS3 and have been fighting and searching for a solution to this problem for a week now, and I'm VERY close!
I crated a MC holding of a series of images (about 50) and I jump around in it using plenty AS3 scripts (most of which I don't fully understand yet, but I'm working on that to! )
I had to find a way to "rewind" (= play backwards) the MC. Since there is a stop(); command in almost every frame, prevFrame does not work and if I put that in a loop, it goes WAY to fast (but worked).. So I could think of only one way...
Create a new (reverserd) MC with the same image sequence ald reverse it manually and play that one.
This all works fine (very proud of it ).
Now my question:
To get this to work for multiple image sequences, I have to load all images twice (once in MC_1 and again in MC_2 and select them and reverse them).
Not a big one, unless you want to create MANY of those SWF's...
Is it possible to load the 50 images of the first MC in reverse into the second MC dynamically? JUST the images, noting else.
extra info: the MC_2 is already in the lib(empty) and placed on the stage.
something like:
var pointer:Number=1;
for (var:i:Number=50;i>=0;i--) {
get MC_1.picure(var);
put it in MC_2.frame(pointer);
pointer = pointer + 1;
All help is welcome and please take into account that I have little experience and copy most of my scripting from people like you
T.I.A.
MelluwI tried your advice (thanks for that)
The event I already have is the mouse leave
I //-d out the part I removed (what did work)
The code I ended up with is:
function Start() {
stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);
function cursorHide(evt:Event):void {
var currFrame = MC_1.currentFrame;
if (CCW == true) { //it is true in this case
movStart = (50 - currFrame);
else {
movStart = currFrame;
if (movStart>25) {
MC_1.prevFrame();
// removed swapChildren(MC_1, MC_2); // This is the part I removed
// removed MC_2.gotoAndPlay(movStart);
else {
MC_1.gotoAndPlay (movStart);
And if I leave the stage on the part where movStart is indeed >25
Nothing happens,
So I guess this is not what you meant
Subject: Action Script 3 how to copy images from another MC in reversed order??
I cannot direct you in the loading of the images approach, it will be too complicated, and will probably not work anyways... when you move away from a frame that has dynamic content, you lose the content. So basically, there is nothing practical in taking that approach.
I do niot understand what the problem will be with the enterFrame/prevFrame approach. If everything you can do with the mouse is already used (which I doubt) by the first mc, then there is nothing else you can do with this file. You probably just need to rethink your control scheme. You should search Google for "AS3 slideshow tutorial", and to lighten up your design, add "XML" in that search.
> -
Read image from excelsheet using labview
i need to know how to read image from excel sheet using Labview...m not able to get the appropriate property to display the image stored in excel sheet.
thank youyou need to ask Microsoft to find out the property name/location under Microsoft Excel.
-
How to load images from css file in JavaFX 8
I have this css file which loads images in JavaFX 8 application:
#pill-left {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
#pill-left .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-left:selected .label {
/* -fx-text-fill: black; */
-fx-text-fill: white;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
#pill-center {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
#pill-center .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-center:selected .label {
-fx-text-fill: black;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
#pill-right {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
#pill-right .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-right:selected .label {
-fx-text-fill: black;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
The images are located at the Java package com.dx57dc.images
In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
ava.lang.NullPointerException
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
at java.lang.Thread.run(Thread.java:724)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
What is the proper way to load images from css in Java 8?
Ref
How to load images from css file in JavaFX 8 - Stack OverflowThere is nothing special to do - you execute the statement from your program just like any other SQL statement. The only thing to be aware of are the privilege/permission issues:
When loading from a file on a client computer:
READ CLIENT FILE privilege is also required for the database user.
Read privileges are required on the directory being read from.
The allow_read_client_file database option must be enabled.
The read_client_file secure feature must be enabled.
Revoking these privileges is also the only way you can prevent a user from executing the statement. -
Any ideas of how to receive images from a wireless camera (2.4 ghz) to my ipad rather than the handheld DVR supplied?
some of those often have webserver so one just navigate to it using a browser
-
How to copy images from iPhone folders other than camera roll?
How to copy images from iphone folders other than camera roll?
Images in these folders are synced to iPhone from different laptop and I need to download them in my laptop. I am able to download and access only those pics which are present in Camera Roll folder.Remaining pics are in different folder and also appearing in Photo Library from all folders.
Same problem is with iPod touch as well.- Via a computer program like PhoneView or Touch Copy
- By using an app like Photo Transfer -
How to transfer images from my iPad air to my mac?
How to transfer images from my iPad air to my mac?
If I use iphoto software, I can't see the ipad air on the browser...You can directly transfer photos and videos via WiFi between the iDevices, PCs, and Macs with an App like Photo Transfer.
See: https://itunes.apple.com/us/app/photo-transfer-app-easily/id365152940?mt=8
Or you can upload the photos and videos to the Dropbox service using the Dropbox App on the iDevice, PC, or Mac and download them to the another device using the Dropbox App on that device. By the way, once the videos are on Dropbox you can share them with others.
See: https://itunes.apple.com/us/app/dropbox/id327630330?mt=8 -
E61i -- HOW TO SAVE IMAGES FROM WEBSITE WHILE BROW...
ANYBODY KNOWS HOW TO SAVE IMAGES FROM WEBSITE WHILE BROWSING IN E61i ???
ABDULLAH SHAHID SHEIKH
IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
TEL. 0092418782792-93
CELL. 00923008651424which version should i use ,, i mean suitable for my E61i,,, the opera mini or the opera mobile????
is opera mini can save the images as well???
25-Aug-200702:43 PM
iantaylor27 wrote:
Hi
If you use opera mobile, it aloows saving of images to memory card etc
www.opera.com
ABDULLAH SHAHID SHEIKH
IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
TEL. 0092418782792-93
CELL. 00923008651424 -
How to send images through PI using SOAP adapter
hi,
Can anybody tell me how to send images through PI using SOAP adapter.
Regards ,
LoveenaHi Loveena,
only as attachments of a SOAP message.
Regards,
Udo -
How to store images in database using java
hii
how to store images in database using java..........
Message was edited by:
naveennagaI asked a similar question once and the answer I got was - Don't.
Instead, store the images on a drive somewhere and store the path in the database.
But I'm no expert - that's just what I was told by someone who does this kind of stuff a lot.
Hope that helps. -
How to move images from Picasa to Lightroom 5 on a mac?
How to import images from Picasa to Lightroom 5 on a mac?
Hi, lnmyers,
I have thousands of pictures stored in Picasa, all of which are stored in my Picasa Web Albums. They are no longer in a directory on my hard-drive, that particular hard-drive having died ages ago. Thank goodness I uploaded them to Picasa's cloud before the hard-drive died. Should that ever darken, I am in trouble. I digress. I downloaded the pictures I wanted from Picasa Web Albums to my new external hard-drive that I set up and attached to my mac. For example: I had a an album called "California 2013" stored in the Picasa cloud. I downloaded the entire album to a folder on my Seagate external drive that I call Lightroom within which I have a folder called California 2013. It took about twenty minutes to get them all (300+ photos). Then, I pointed LR to the California 2013 folder on the Seagate external drive when I wanted to catalogue the pictures into LR. I did not worry about metadata; I took whatever came with the pictures and didn't worry about it. I added copyright, keywords, and ownership info with LR.
I hope that helps. -
How to improve image resolution with using filters
how to improve image resolution with using filters?
image resolution, Please check the below links. They should give you a clear idea about Resizing and resampling images.
http://helpx.adobe.com/photoshop/kb/advanced-cropping-resizing-resampling-photoshop.html#m ain_Resizing_and_resampling_images
Understanding Resize vs. Resample | Learn Photoshop CS6 | Adobe TV
Cheers!
~ Arpit -
How to retrieve data from MDM using java API
hi experts
Please explain me the step by step procedure
how to retrieve data from MDM using java API
and please tell me what are the
important classes and packages in MDM Java API
thanks
ramuHi Ramchandra,
You can refer to following links
MDM Java API-pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49
webinr of java API
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/89243c32-0601-0010-559d-80d5b0884d67
Following Fourm Threads will also help.
Java API
Java API
Re: usage of java API ,
Matching Record
Need Java API for Matching Record
Thanks and Regards,
Shruti.
Edited by: Shruti Shah on Jul 16, 2008 12:35 PM -
How do i pin from FB using firefox ???!!!??
How do I pinterest from FB using firefox ?
I dont want to install chrome- I dont want to waste the space. I cant believe firefox doesnt have a way to do it- they must ??!!Pinterest offers two solutions for Firefox users. One is an add-on button, and the other is a "bookmarket."
What's the difference?
* Add-on (extension): This creates a graphical "P" button that you can place on your main Navigation toolbar. The add-on is running all the time, and may have more advanced features.
* Bookmarklet: This creates a text button on your Bookmarks Toolbar. It doesn't do anything until you click it, at which point is adds a script into the page you're viewing.
''Note:'' if you do not generally display your Bookmarks Toolbar, then the bookmarklet might not be convenient for you. You can show that bar using either:
* View menu > Toolbars
* right-click a blank area of the tab bar (or the "+" button)
What do you think?
To grab either of the Pinterest buttons, go to this page: http://about.pinterest.com/goodies/#browser
There is a small link to switch between the add-on and the bookmarklet.
Any luck? -
How to display items from database using catagorylookupdroplet
Hi everyone,
i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
Thanks in advance,<dsp:droplet name=".................../CategoryLookup">
<dsp:param name="id" param="itemId"/>
<dsp:oparam name="output">
<dsp:valueof param="element.displayName"/>
<%-- This is show the Child Category --%>
<dsp:droplet name="......................./ForEach">
<dsp:param name="array" param="element.childCategories"/>
<dsp:oparam name="outputStart">Child Categories</dsp:oparam>
<dsp:oparam name="output">
<dsp:a href="">//bydefault it will take its own file's name
<dsp:param name="itemId" param="element.repositoryId"/> <dsp:valueof param="element.displayName"/>
</dsp:a>
</dsp:oparam>
</dsp:droplet>
<%-- This is show the Child Product --%>
<dsp:droplet name=".............../ForEach">
<dsp:param name="array" param="element.childProducts"/>
<dsp:oparam name="outputStart">Child Products</dsp:oparam>
<dsp:oparam name="output">
<dsp:droplet name="................/ProductLookup">
<dsp:param name="id" param="itemId"/>
<dsp:param name="elementName" value="Prod"/>
<dsp:oparam name="output">
<dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
<dsp:img height="250" width="250" src="<%=img102%>"/>
</dsp:getvalueof>
</dsp:oparam>
</dsp:droplet>
<dsp:a href="productView.jsp">
<dsp:param name="itemId" param="element.repositoryId"/>
<dsp:valueof param="element.displayName"/>
</dsp:a>
Hope this helps.
-RMishra
Maybe you are looking for
-
I have just today recieved a brand new iPod Touch 4th generation iPod with the latest update. Everything else on the ipod is working and my computer is able to read the camera fine, but iTunes cannot recognise it - even after restarting and trying di
-
Button Link Transitions with Audio?
Ive got a question on what can be used as a Button Transition. I have a 10 sec. AV in PP2, that I want to use. In general, no problems. Ive Exported the Video to DV-AVI (silent), and it works beautifully. I only have to do a blend from the Menu for t
-
Please help!
-
Text dataSource Identification
Hi, I need to find out Text Master DataSource for Billing Doc type.I will provide my InfoCube details.Sothat it would be easy for you to advise me.I have the following InfoObjects in my Cube dimensions. 1.Sales document --- 0DOC_NUMBER 2.Sales Docume
-
Intermedia cannot handle wildcards in large set of records First set of cases is OK , since the data is less . Second set of cases fail because of the large data . select count(*) from S37PORTD.cmdoccontents - 933 select count(*) from S37PORTD.cmdocc