A Flash Developer Resource Site

Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 66

Thread: resize image on load

  1. #41
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Yeah, that was kind of the idea behind why I originall asked this question. The app I'm doing is a lot like yours, only instead of models, it will showcase multiple photos of vehicles. Also, mine probably won't look as clean
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  2. #42
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Quote Originally Posted by mneil
    It runs pretty good on a cable connection. I ran it with sloppy at 56k to see how it would work; since I haven't really tested my own, and it took 20-30 seconds to see the first image. Have you tested speed yet gparis, and what did you get? Also, might I ask what the file size is of each of those pics? Oh, and I know your still working it, but I'm assuming a preloader too right? That's a pretty dumb question I know but I'm asking because I'm wondering if it will show loaded before the bitmapData.draw() has the chance to actually render the picture on slower processors; and if so, what kind of wait?

    Again, thanks for all the interest guys.
    That website is not dial-up audience targeted at all ( ..and never will be ). Nor is it for 800x600 res.
    that app. is best viewed with fast connection and at 1280x1024 res (although entirely viewable at 1024x768)

    There is a preloader on the thumbs loading only (since that's the only image loading) the little loaded image # of # on top of the thumbs.

  3. #43
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    I think the quality that it gives doesnt do it justice unless visually SEEN.

    while I dont think I would use it for scaling down my thumnbails and what not.. it definitely would help to display gallery images (and what not) perfectly without having to worry about a users resolution.. (or making different versions of a site)

  4. #44
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    oh, the thumb scaling is just a simple _xscale/_yscale on the thumb container's _parent. Nothing fancier

    The whole concept of this project is that is viewable on any res without changing a thing. (higher than 1024x769) also a little fullscreen on right-click (context menu) is a cool addition.

    gparis

  5. #45
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    I didn't really get the idea that the audience would be a dial-up'er; just hoping you had some answers. I've got an audience of about 40% dial up. So with the split I have to take them into consideration, plus 40% is a large number, so I can't really say only a few people will have the wait.

    whispers, that would be a good use for this method.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  6. #46
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    In case of dial-up, if you use a similar method, you should definitely:
    1) make sure the big pictures aren't too heavy - therefore not 1100px by 800px like in my case.
    2) make a nice thumbnail preloader (since that's where you load the whole image galery)
    2b) preload and park all pictures while showing something else, so they get cached.

    gparis

  7. #47
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    gparis your site looks fantastic on my 32" lcd television that i use as a monitor..this is the type of stuff that i was trying to get across....you are a very advanced flash artist .
    ~calmchess~

  8. #48
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    sorry, not to be petty here.. but what was it you were trying to get across again?

    You stated bandwidth isnt an issue doing this.. (along with some xml questions)

    and gparis clearly states this is NOT for dial up users...etc..etc..etc..

    but I agree.. that little site is very impressive with the bitmap handling..

  9. #49
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    calmchess, your post reminded me. Here's the fla. All it does is load the pic and resize them into thumbnails; but it won't take much to finish it from there. I'm busy with some other stuff right now so this is going on the back burner until I get some other work figured out. Let me know what you get.
    Last edited by mneil; 10-11-2007 at 06:52 PM.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  10. #50
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    I was trying to get across that not all flash has to be built for todays audience I meant in an earlier post that lets not always worry about bandwidth and processor speed when building flash based sites because our flash sites that aren't meant for todays hardware and bandwidth can be archived and then in the future when appropriate the archived flash sites can be used for the general internet audiance i beleive being on the cutting edge of technology part of the time is important even if the general internet audiance isn't ready for my web content .
    ~calmchess~

  11. #51
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    I'm sure the next response would be:

    That's poor planning. Sloppy programming. By the time they are ready for it it may be obsolete.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  12. #52
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    mneil-

    is that how you feel?

    You tink you should design 'something' knowing its not as effective as t can be... and instead of fix'ing tweaking something to work or be optimized better..just 'hide it away' until those limits are no longer socially adhered to?

    And yes, I do think there is definintely room for something to become obsolete..

    say you design something that needs alot of bandwidth to be displayed. (VIDEO clip embeded into an HTML page)....

    noone can see it cause the world uses dial-up...

    well along comes something like FLASH.. where it STREAMS data.. making larger files and wait time a ting of the past....etc..

    (you see where Im going with this?)

    Im all for learning, as much as and as varied as you can get..(in ALL walks of life)

    but I think doing tings because you can does nothing more than fill your own personal curiosity..and designing without the limits/requirements of the world around you is just poor practice.

    but to each their own..

  13. #53
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    yes whispers you are right I like to fill my own personal curiosity i spend alot of time in my own world where the entire internet is from my nic card to my router and back.....I don't really care about making money or who can see my web content and it is a poor programming practice but i program both ways you know I program for the audiance whether it be myself(part time) or the general internet audiance. anybody that wants reconition for their websites should stick to programming for the general audiance anybody who programs for the joy of programming I say should mix their audiances between the gerneral public and their private domain. thankyou for keeping an open mind about my posts its so hard for me to find somebody that understands how i feel....i thank god for flash kit.
    ~calmchess~

  14. #54
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    No, I completely agree with you. You made a statement above about calmchess' previous statements like "bandwidth not an issue" and I don't believe his statement one bit. I was avoiding some conflict and more interested in getting my project done. But, you brought it up again and I went back and edited my post; leaving a comment that said:
    whispers 1, calmchess 0.

    That's because you made a point, and I'm not sure where calmchess is going with this but I don't really care what he does with it as long as we can benefit. So really how my last post should have been read is that it is dumb to write sloppy code with limitations so large that it won't be accessible for years. Limits on bandwidth are what pushes programmers to write the most efficient, effective code that there is; that way when some limits are let up they are able to expand their code and push the limits again.

    I'm not playing with this bitmapData.draw method to resize thumbnails because I think it's the "most" effective way to deliver the pictures I want. But I thought I'd explore all the options. I've already got a system that is working for me that really requires no changes. But I thought if there was something else out there I could use that might do what I wanted and 1) make my job easier and 2) still look good and be accessible then I'd try it. I work for a car dealership(as I've said 1000 times now I think ) and these pictures being accessible to all of our customers may mean the difference between a car sold and a car sitting on the lot for months. So of course I'm going to choose the most efficient method in the end, but I really like the bitmap class and its capabilities.

    To repeat myself, I don't think writing code that isn't accessible is smart at all. And, I would never work so hard on something only to shelf it and think that I'll use it in a couple years just because I was being lazy and sloppy. That's just dumb. And, I've had a lot of interaction with you lately, I hope you don't take me for that kind of person.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  15. #55
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    to be clear I am NOT trying to argue with anyone. I am trying to state what I believe to be valid points/facts..

    someone may have an opposite opinion and bring a fact to light for me and change my opinion.. which is why we have 'discussion board'

    I appreciate others opinions..especially those that differ form mine form time to time.

    Again, I am ALL (100%) for learning a variety of ways to solve a problem... that is what lets you decide what is BEST for any given solution.. if you only know one way..then you HAVE NO choices..


    I dont take away any negative 'thoughts' about anyone here who posts about technical/flash related topics.

    The petty bickering and arguing is NOT smiled upon though. You can state your version/opinion, but everyone would do good to keep an open mid to OTHER ideas/solution proposed (even if they ultimately prove your way NOT to be the best)

  16. #56
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    gparis,

    I'm guessing you can't use duplicateMovieClip with a bitmap that is drawn to an mc to make a copy. What's the method you used to get both a thumbnail and the fullsize. Do you have to draw it twice. That sounds hefty. Thanks.

    whispers-
    I doubled the size of my original bitmap after loading it and it still looks good. I did a 250x300px @ 16k to 500x600 and the quality is close to the same. So what I'm thinking now is I'll make the original filesize smaller than I need and just "blow it up" after I draw it. That should save some of my bandwidth.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  17. #57
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    sounds like a plan mneil let me know how the quailty of your image changes.
    ~calmchess~

  18. #58
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    I'm guessing you can't use duplicateMovieClip with a bitmap that is drawn to an mc to make a copy. What's the method you used to get both a thumbnail and the fullsize. Do you have to draw it twice. That sounds hefty. Thanks.
    I use attachBitmap()
    I load the image into the thumbnail container mc
    The thumbnail itself is resized _xscale (around 7%) NOT the container that gives me the original width & height of the .jpg.
    Then i copy/draw and attachBitmap() the copy to the main container.

    gparis

  19. #59
    Junior Member
    Join Date
    Jul 2007
    Posts
    25
    i didn't think my little comment would lead to such a.. errr.. 'discussion' ;-)

    mneil, i'm just wondering why you prefer to do it this way ie "blowing up" the images rather than whispers' suggestion of resizing (automatically) in photoshop?

    (genuine question, not trying to start a fight )

    as for the "cutting edge" comment, i think it could be argued that creating quite a graphically heavy website that is accessible to 56k users as well as broadband users is much more cutting edge than using techniques just because they exist..

  20. #60
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    there are other ways when you do not want to penalise broadband users by showing them small pictures when their connection can take bigger.

    One very simple way is to use 2 separate images folders containing different pictures dimensions.
    And there are plenty more.

    Conclusion: the techniques are to be used according to the mandate, in first place.

    gparis

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