Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

rondog

BusinessGreen
  • Posts

    16
  • Joined

  • Last visited

About rondog

rondog's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Sorry Carl and Jack, I know you guys said you like to keep the questions on topic with the API, but I feel this is. I am applying filters to a bitmap using something like: TweenLite.to(origBitmap,0,{colorMatrixFilter:{saturation:2,brightness:3}); and that works fine. I need to somehow apply a sharpen filter to the video which I have successfully achieved using a ConvolutionFilter. The problem is after I've ran the above tweenlite call, then create a convolution filter and apply it to origBitmap, it removes the initial saturation and brightness filters and just keeps the sharpen filter private function applyEffects(effects:Array):void { currentEffects = effects; var props:Object = {}; for (var i:String in effects) { props[effects[i].effect] = effects[i].amount; } TweenLite.to(bitmap,0,{colorMatrixFilter:props}); //-- props could look like {saturation:2,brightness:3} //-- This will sharpen the container sprite var matrix:Array = [0, -1, 0, -1, 5, -1, 0, -1, 0]; var conv:ConvolutionFilter = new ConvolutionFilter(); conv.matrixX = 3; conv.matrixY = 3; conv.matrix = matrix; conv.divisor = 1; bitmap.filters = [conv]; //-- this removes the above filters and just sharpens the image } Is there a way to also incorporate the ConvolutionFilter in that TweenLite call above? I've searched quite a bit and found some guy made a class called TweenMan which was based around your class where ConvolutionFilter is incorporated: https://github.com/danro/tweenman-as3
  2. Thanks for the suggestion Jack. I tried doing what you said, but it still did not work. I thought more about your suggestion and came up with a working solution! var graphicsData:Vector.<IGraphicsData>; graphicsData = container.graphics.readGraphicsData(); var origBitmap:Bitmap = new Bitmap(); origBitmap.bitmapData = GraphicsBitmapFill(graphicsData[0]).bitmapData; //-- at this point I have a screenshot of the video var props:Object = {}; for (var i:String in currentEffects) { props[currentEffects[i].effect] = currentEffects[i].amount; } TweenLite.to(origBitmap,0,{colorMatrixFilter:props}); //-- at this point I've reapplied the effects. //-- originally, sending bitmap.bitmapData to the encoder didn't retain the filters so I went 1 step further //-- create a new bitmapData and draw the reapplied filter'd bitmap var filteredBitmapData:BitmapData = new BitmapData(640,360); var filteredBitmap:Bitmap = new Bitmap(filteredBitmapData); filteredBitmapData.draw(origBitmap); //-- encode the new bitmap data var image:ByteArray = new JPGEncoder(85).encode(filteredBitmapData); //-- filteredBitmapData is now filtered and I can send this to the server
  3. Unfortunately, I have already posted to SO and it hasn't received much attention so far: http://stackoverflow.com/questions/32705844/my-bytearray-isnt-retaining-filters I thought of posting here because I am using TweenLite to apply the filters and thought maybe Jack would have some insight
  4. I have an RTMP stream that I need to take a screenshot of. I got a security error using bitmapData.draw() since it was coming from AWS S3 so I found a workaround that allows me to take a screenshot of the video: var bitmap = new Bitmap(); var graphicsData : Vector.<IGraphicsData>; graphicsData = container.graphics.readGraphicsData(); //-- container is a sprite that holds my video element bitmap.bitmapData = GraphicsBitmapFill(graphicsData[0]).bitmapData; var image:ByteArray = new JPGEncoder(85).encode(bitmap.bitmapData); At this point, I send the ByteArray to PHP, create a JPG out of the ByteArray and save it to the server. That all works great. The issue is I apply filters real-time to the container sprite which alters the look of the video like brightness, contrast, saturation etc, but when saving to the server, the saved image doesn't contain the filters I had applied. I tried reapplying the filters to bitmap, graphicsData and bitmap.bitmapData before sending it to the server, but nothing has worked yet. How can I either retain the filters applied or re-apply the filters to the above code? Here is how I initially apply the filters: private function applyEffects(effects:Array):void { currentEffects = effects; var props:Object = {}; for (var i:String in effects) { props[effects[i].effect] = effects[i].amount; } TweenLite.to(container,0,{colorMatrixFilter:props}); } props object could look something like: {contrast:0.5,saturation:1}
  5. thanks for the reply. That certainly did speed it up. Does that CSS property start hardware acceleration?
  6. First, let me say, I don't think this is a problem with GSAP. Look at: http://dopserv1.dop.com/test/ (sorry, I only have an MP4 at the moment) On the image on the right, when you mouse over and click the zoom icon, a larger image appears. The animation of the slide growing is choppy prior to starting the video. After the video has begun to play, the animation is much smoother. Anyone know the reason for this? I have tested this in Chrome on windows 7 and safari on OSX, both with the same behavior
  7. I would use tint, however, I have a drop shadow on the text and if I tint it, it changes the color of the shadow too
  8. Ok, I've changed it from 0xffffff to a different color like red and it works. If I try anything close to white it doesn't work..I tried f1f1f1 and f2f2f2 and they both didn't work.
  9. I am trying to apply a colorMatrix filter on a text field and it doesn't seem to be working private function menuOver(e:MouseEvent):void { TweenLite.to(e.target.txt,0.5,{colorMatrixFilter:{colorize:0xffffff},ease:Expo.easeOut}); TweenLite.to(e.target.bg,0.5,{colorMatrixFilter:{colorize:0x3299FF},ease:Expo.easeOut}); } The bg changes color, but the text does not. Any ideas?
  10. nevermind..I have to activate the plugin now..
  11. rather than open another topic, hopefully somebody see's this. autoAlpha for TweenLite stopped working for me now too. TweenLite.to(mc,1,{autoAlpha:0,ease:Expo.easeOut}); doesn't work.
  12. I tried yoyo:true also and that still doesnt work
  13. I have the latest version of TweenMax and yoyo stopped working for me: for (var i:int = 0; i < buttons.length; i++) { var targ = getChildByName("btn" + i); targ.id = i; targ.buttonMode = true; targ.useHandCursor = true; targ.addEventListener(MouseEvent.CLICK, onClick); TweenMax.to(targ, 0.5, {alpha:0.3, yoyo:0,ease:Linear.easeNone}); } any idea why?
  14. Ahh perfect..that is exactly what I needed
×