A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Image smoothing w/o data access?

  1. #1
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625

    Image smoothing w/o data access?

    Loader.content.smoothing = true;

    The line above triggers the so called pixel-level access to an image. Basically it's like using the BitmapData.draw() method. Images that don't reside in the same sandbox will through an exception when being loaded.

    Is there a way to enable image smoothing on a static/global level?

    This thing sucks big time. Image smoothing is nothing like data access... I can't understand why Adobe did this..
    Altruism does not exist. Sustainability must be made profitable.

  2. #2
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    shot in the dark -- what would happen if you took the loader.content and forced a new BitmapData to draw() it with the smooth parameter set true?

  3. #3
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    The problem is that any access (either direct or indirect) to the Bitmap object representing a remotelly loaded image will trigger the security lock.

    I foolishly tried to add the loader as a child of a new sprite and using the BitmapData.draw() method on the sprite, but obviously the method is called recursively within the children of a drawn object.

    This is so bad. It's a logical pit.
    And I am stuck on an application I can't finish building because of this very lame issue with the Flash Player. Obviously I can't get the other part to place crossdomain policies specifically for me, otherwise I would have already solved the problem.

    What a shame.
    Altruism does not exist. Sustainability must be made profitable.

  4. #4
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    Could you write a PHP script to copy the image to your server on request?
    You don't even need GD, you can just do something like:

    $img = implode("",file($webaddress));
    $handle = fopen("localImage.jpg","w");
    fwrite($handle,$img);
    fclose($handle);

  5. #5
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I've thought about that. Unfortunatelly this is not feasible: it could generate hundreds of dollars in hosting expenses when the app gets a broad audience...

    uhmmm
    Altruism does not exist. Sustainability must be made profitable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center