Image capture and send with post

Ok, like the title suggests, I have a lil paint function
drawing on a canvas in flex 2. What I need is to get that image all
captured and bundled up to send to asp.net VB. The site is here:
we are UNLIMITED .com Click on
start, then Draw, and you will get to play with that canvas. You
can draw all day, different brush sizes, colors, and erase. I need
a capture button there to get the image off the canvas into BYTE
format. Mainly what i need help on is sending that byte array from
flex to asp.net VB, and REALLY need help on catching that byte
array in asp.net VB and getting it to the point i save save it to
the server HDD via the file I/O. I have already been able to save
XML docs to the HDD with asp.net VB to be read by flex via the file
I/O. I really just need some asp.net vb code to do the "POST" catch
(or request), and get the image to PNG? format to be saved. This is
going to be a small paint program in flex, members can use to
create their avatar. I will be implementing say a crop, copy/paste,
drag and drop, resize and what not, to give my users more
flexability as far as what their image looks like. I'd really like
it to be as close to a basic "windows paint" program. But that's
another story. For some reason every time I look up passing
variables from flex (flash) to asp.net vb, it's POSTing form vars,
and really none of it has dealings with images. I know it's
probably really the same, but like I was trying to say, I just get
all kinds of confused with working with byte arrays and asp.net vb
and flex. I was actually supposed to have this site up and running
this past Aug, but with the swap to flex, the pains of membership
between flex and asp.net vb, and my general newbie beginnings of
this whole aspect of computers. Let's just say it's taken a bit
longer than expected.
So to recap from all my babbling:
I need to:
(flex)
Capture the image on that canvas (see link)
load to asp.net VB (pref. using POST)
(asp.net VB)
create an asp.net vb page to receive/request that image
reformat that image ( pref. PNG )
save the formatted image to the server HDD
This should be fairly simple, and I'm almost embarrassed to
ask for help. I've just been trying to work through this muck for
way too long, and I really need to get past this.
code snippets would be great, although just some good
resources to look at would be great too. I do entirely appreciate
any help in this matter.
Daniel Keeney
WebMaster
we are UNLIMITED .com

You've probably already worked this one out but I thought I
would post my solution - not elegant but it works
I spent two days trying to find an asp.net solution in VB.net
to no avail so here goes:
Actionscript:
var bitMD:BitmapData = new BitmapData(this.width,this.height)
bitMD.draw(this);
var _PNG:ByteArray = PNGEncoder.encode(bitMD);
var U:URLRequest = new URLRequest
U.method = URLRequestMethod.POST
U.data = _PNG;
U.contentType="application/octet-stream";
U.url = "
http://localhost/CARTO/image.aspx";
var UR:URLLoader = new URLLoader
UR.dataFormat = URLLoaderDataFormat.TEXT
UR.load(U);
ASP.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim b() As Byte = Request.BinaryRead(Request.TotalBytes)
Dim ms As MemoryStream = New MemoryStream(b)
Dim img As System.Drawing.Image = Bitmap.FromStream(ms)
Dim bmp As Bitmap = New Bitmap(img)
Dim tempStream As New MemoryStream()
bmp.Save(tempStream, System.Drawing.Imaging.ImageFormat.Png)
Dim fs As New
FileStream(System.Web.HttpContext.Current.Server.MapPath("test.png"),
FileMode.Create)
tempStream.WriteTo(fs)
tempStream.Close()
fs.Close()
End Sub

Similar Messages

  • Hello apple guys, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    hello apple guys, after installing OS X Mavericks, i can't open app store, reminders, contacts, mail(crash), maps, Image Capture, and other apps that comes with Mavericks OS, how i can solve this problem?

    So is this the way Apple works now? Not solving customers problems? I'm sure so many users have had this problem. I've had, and I reinstalled Mavericks 3 times. Works fine for some days and then several Apple Apps stop working. Is that a way to force us ti update to Yosemite? (I don't want to) and then pay to update some third party programs (i.e. Pro Tools). Also, there are so many 15" MacBooks Pro with graphic problems and of course the guys at the Apple Service Centers always say: "It's the logic board, you can have it replaced, but it's so expensive I would recommend a new Mac".  I really, really miss Steve Jobs!

  • Image Capture and MP4 and MOV with iPhoto

    Using Image Capture, I tried to transfer pictures and movies (MP4 and MOV) from my iPad 3 to iPhoto on my iMac. Things were looking good, images and movies were transfering fine, iPhoto had opened with all of them in a new event. I was able to play both MP4 and MOV from iPhoto. Then I quit iPhoto and Image Capture and launch iPhoto again and try to play the movies that I just imported, iPhoto says it can't find them. It seems that it can't find them if Image Capture is not running !? Although the pictures are fine. Can somebody help me ? Thanks for the help.

    I needed that option off because I want to keep them only on my NAS, so PC users can still accesses them when needed. I didn't want different sources, only on that I know is "the actual source".
    Now, I did import them on Images directory using Image Capture and it worked. Then I moved them to my NAS.
    But I just realized that the iPad appears in iPhoto and that I can import them into iPhoto directly ! It works fine, meaning that if I disconnect the iPad from the iMac, the movies play just fine. The initial setup was to launch Image Capture when the iPad is connected to the iMac. I disabled it. I plan to use the import from iPhoto instead.
    But I still need to keep those pictures and movies on the NAS as well. It means that I will need to export them on the NAS eachtime.
    Thanks for your help, it really helped.

  • Image Capture not working with Canon LiDE 500F

    Image Capture version 6.0.424 and CanoScan LiDE 500F 11.2.5.0 does not work properly.
    Regardless the resolution, the resulted file has a very small size.
    As a test I scanned a 9x20cm document at different resolutions and for all resulted files 'Get Info' reported small dimensions: 69x147 pixels. It is interesting that the size of the file varies with resolution, but when opened in Preview or Acrobat Reader, the small size is used.
    As for other reports, CanoScan Toolbox works properly.
    Regards,
    Liviu

    Hello Liviu,
    There has been a couple of posts regarding the same issue with Image Capture. Have a look at this one for example.
    http://discussions.apple.com/watches!add.jspa?forumID=1344&threadID=2272250
    As I stated in this thread, I do not have this problem with Image Capture and my LiDE 200 or my MP980 AIO. So there must be something with the drivers used by these older model of Canon scanners when using Image Capture.
    I haven't seen anyone provide a solution as yet so you may need to escalate this to Canon if you have a need to use Image Capture.
    Pahu

  • Image Capture and iPhoto recognize my camera as a device but won't display photos

    Everything worked fine under Mavericks.  Might have to revert to that again if this problem isn't fixed.  I'm downloading the Mavericks installer as I write this.

    As has been noted in other posts about this problem, reformatting the card is not a solution.  I format the card after I download pics in Mavericks on a regular basis.  The problem lies with Yosemite's remake of Image Capture (and iPhoto), not with my old Canon camera.

  • Image Capture and iPhoto have extra copies of my devices

    Every time I open up iPhoto or Image Capture, a previous copy of my iPhone appears as if it is a separate device that is already connected to the app. This happens even if I open the app and have not attached my actual iPhone. (I only attach my iPhone to the Mac, and nothing else.)
    In iPhoto, the device WILL "unmount", but appears again on every startup. There are 1734 images on this imaginary device, and my actual iPhone is under 800 images at the moment. My iPhoto will SOMETIMES let me import my photos (so I can save them to the laptop and clear up space on the iPhone).
    In Image Capture, the device will not "unmount" (or remove or whatever the proper term is). The images on that device will not delete, will not download, and will not import or "delete after import". I'm not sure what else to do other than delete the app and reinstall it, but this makes me mildly nervous sinec I'm not terribly savvy with Macs yet. (I was a PC "go-to" guy in every office I ever worked in for about a decade, so I'm not a total n00b.)
    And help, tips, or advice would be appreciated!
    ~Alan

    As has been noted in other posts about this problem, reformatting the card is not a solution.  I format the card after I download pics in Mavericks on a regular basis.  The problem lies with Yosemite's remake of Image Capture (and iPhoto), not with my old Canon camera.

  • Image Capture and Preview "folder not writable" error importing to shared folder

    I'm running 10.8.5 on a Late 2012 model Mac Mini. I'm trying to create a folder under my home directory where my wife can import pictures using Image Capture or Preview while logged into her account. I've tried setting permissions on the folder by setting POSIX permissions and ACLs from the command line, and also by setting ACLs using Get Info in Finder, but it seems as though both Image Capture and Preview ignore the ACLs and instead rely solely on the POSIX permissions for everyone/other (even when a relevant group is set). Unless the POSIX permissions for everyone/other are "rwx" Image Capture and Preview both give an error that the import failed, and /var/log/system.log shows errors that the "folder is not writable". I'd like to be able to set this up without making the folder and the files in it writable by everyone. My understanding was that ACLs should take precedence over POSIX permissions, but even the POSIX permissions don't seem to be getting handled properly, because the group is ignored. Any help or explanation of what's happening would be appreciated.
    Here's an example with details:
    Suppose we have the users alice and bob. We want to set permissions on the directory /Users/bob/importdir such that Alice can import files from a camera there using Image Capture (or Preview, either would do), but don't want to relax the permissions more than necessary.
    We create a group named bob_and_alice
    We set the following permissions on /Users/bob:
    POSIX: rwxr-xr-x, owner=bob, group=staff (i.e. default POSIX permissions)
    ACLs:
    0: group:everyone deny delete
    1: group:bob_and_alice allow list,search,readattr,readextattr,readsecurity
    2: user:alice allow list,search,readattr,readextattr,readsecurity
    "Get Info" shows "Read & Write" for bob and "Read Only" for alice, bob_and_alice, staff, and everyone
    We set the following permissions on /Users/bob/importdir:
    POSIX: rwxrwxr-x owner=bob, group=bob_and_alice
    ACLS: (these are already probably more permissive than should be necessary)
    0: group:bob_and_alice allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,re adextattr,writeextattr,readsecurity,writesecurity,file_inherit,directory_inherit
    1: user:alice allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,re adextattr,writeextattr,readsecurity,writesecurity,file_inherit,directory_inherit
    "Get Info" shows "Custom" for both alice and bob_and_alice, "Read & Write" for bob, and "Read Only" for everyone
    Alice opens a Terminal and cd's to /Users/bob/importdir. Alice can create and delete files in this directory.
    Now Alice opens Image Capture and with our camera connected we try to import a photo to /Users/bob/importdir. Image Capture shows an error dialog with the text "Import error. An error occurred while importing. The item 'foo.jpg' was not imported." /var/log/system.log shows the message: "Jul 20 22:12:34 computer_name.local Image Capture[32804]: Document destination folder is not writable" If instead Alice uses Preview it shows an error dialog with the text "The selected folder is not writable" and /var/log/system.log shows two error messages:
    Jul 20 22:23:45 computer_name.local Preview[33280]: Document destination folder is not writable
    Jul 20 22:23:45 computer_name.local Preview[33280]: Encountered error during image import: Error Domain=com.apple.ImageCaptureCore Code=-9934 "The selected folder is not writable" UserInfo=0x7ffda4881f00 {NSLocalizedDescription=The selected folder is not writable}
    Now we change the POSIX permissions on /Users/bob/importdir to: rwxrwxrwx
    The import succeeds with both Image Capture and Preview
    Can anyone explain what's going on here? Is there another reasonable way to do this without, moving this shared directory to /Users/shared?

    Did you figure out how to fix this?

  • Image Capture and Preview have trouble finding scanner. Photoshop no problem.

    Image Capture and Preview have trouble finding the scanner wirelessly unless it is on when the Mac starts up. Photoshop finds the scanner no problem. Any suggestions for Image Capture or Preview?
    The scanner is Canon MP620. Mac is MBP, running 10.8.2
    I have done all the uninstall, reinstall, update drivers, etc. Please don't bother suggesting that stuff.
    Thanks.

    As for the scanner - so is this new one wireless? When I hooked up my Epson All-in-One, I had to install it via USB first before I could install the wireless (per their instructions).  With Snow Leopard, I simply installed the driver and it covered and recognized both the print and scan function - not so in Lion; I had to go through hoops with the scanner part and it finally showed up as a separate unit. I thought that is silly, but - as long as it works.....  I'm trying to think of possibilities since I'm about out of ideas, so you might want to consider that (if it applies). The other troubleshooting suggestions usually include redoing the "add" function after a reboot.
    As for Image Capture, I am out of ideas. FWIW, I never use it - in my workflow, there is no need for it. Not sure if this would have an impact, but make sure that you choose Image Capture in the CDs&DVDs Preference Pane (mine is set to ignore or ask purposely):
    If that does not work, I'd suggest reinstalling the OS over the top of what you have.

  • Taking pictures using image capture and Nikon d50

    Hi, does any one know if it is possible to take pictures using image capture whilst my nikon d50 is connected to my MacBook so that the image is shown on the MacBook screen.

    Yes! Indeed, I have that very same D50 (lovely isn't it?) and I just happenned to have taken already some pictures with it, from the computer.
    Once it's pluggeg, go in Applications> Image Capture.
    From there, you will either be able to download all the picture from the D50, or take new shots.
    You can even share the camera (and it's pictures) online, so someone can even take picture with it (through a webpage). You could even try this yourself, play around in Image Capture and with it's share features, and somewhere it will give you the adress (internal ip adress) so suposely someone from your network (including your own computer) could go, check, and take pictures.
    I've tried the web interface from my computer, but couldn't make it work with another one from my LAN. Have to work around this.
    But in Image Capture, first make sure the D50 is selected (Devices>[pick it]) and then there is what you are looking for in the upper bar of the window.
    Have fun!

  • Image Capture and Samsung All-in-One SCX4825FN Preview Delay

    I am trying to scan using a Samsung SCX4825FN all-in-one printer, scanner and fax machine. It is installed using an ethernet cable via my internal network. Two Macs see and scan with it without a problem. The third used to, but since I tried installing Samsung's own scan software (just to see if there were any OCR capability in it, which there wasn't), each time I try to open up the flatbed scanning, it takes hours (literally) to do the preview scan, and in the meantime, the computer is almost unusable. The printer (scanner) appears to correctly do the preview scan, then do a more detailed scan (at very high resolution?), which takes it ages, and it uses this to build the preview scan.
    Other computers haven't changed, so I assume it is the since Mac that needs fixing. It also doesn't happen with the multi-sheet feeder scan on any of the computers, so it is only the flat-bed scan that causes the problem.
    I have tried fixing permissions, removing the Samsung software completely (I then couldn't see the scanner at all) then reinstalling the minimal amount, deleting permissions for Image Capture and for the Samsung Scanning software, changing preferences within the Samsung software, but all to no avail. It still takes a couple of hours to complete the initial preview scan on the one computer but not the others. Has anyone got any other ideas?
    I would like to delete the Samsung software off the problem Mac and then copy over the required drivers from another computer to let it scan without a problem using the standard Snow Leopard install, but I am not sure which files to copy over. I am worried that the (not very good) Samsung installation software is taking off more files than it is supposed to when I remove it, but I am not sure what it is supposed to leave on there, or perhaps it is leaving too much on there.
    The nice installation software from Samsung forces a restart each time you try and do anything, as well as insisting that no other software is running while it is trying to make changes, so I am already a little unhappy about what kind of changes it is trying to make since most Apple software is not that crazy...

    Interestingly here is what I received from Brother. (Note that scanning using the Control Center works fine.):
    Dear Brother Customer,
    Thank you for taking the time to write to us.
    Is your machine able to scan using the Brother ControlCenter software?
    If you are able to scan with the ControlCenter, the drivers are
    installed and working properly.
    Your issue is with Apple's Image Capture software and should be referred
    to them for support.
    When you open the Apple software, you will need to click DEVICES in the
    Menu Bar, then select the disclosure triangle next to TWAIN devices to
    reveal the Brother TWAIN device.
    Select the Brother TWAIN and click OK.
    You should now be able to scan with Apple's Image Capture application.
    For any additional assistance with the Apple application, we suggest you
    contact Apple for assistance.
    We hope this information will be useful to you. If we can be of further
    assistance, please let us know.
    Best Regards,
    MFC Macintosh Support
    Brother International, USA
    Email: [email protected]
    So, who owns the problem: Brother or Apple? If I go to the Apple Store I see Canon and HP scannners for sale but not Brother. Maybe that is part of the problem. Corporate relations between Brother and Apple.

  • Image capture and scanner

    I have a Brother MFC5440-CN all in one machine that I use as a scanner. It works great with my G4 Powerbook using Image Capture. However, with my iMac, Image Capture knows that the MFC-5440-CN is there, but thinks that it is not connected. I have downloaded the latest firmware and drivers for the MFC5440-CN. Is there a fix for this and why will it work with my G4, but not my Intel based iMac?

    Hi L,
    Thanks for all your help, but still not joy. When I try to scan with Image Capture I get the following message:
    Failed to connect to device
    -Check the I/F cable connection between the device and your computer.
    -Please turn OFF the device once, and then turn ON the device again.
    Then try again.
    [MTW005]
    Not sure what the I/F cable connection is, but the all in one machine is connected to the system with an ethernet cable to a router. Apparently this is not a problem for the PowerBook G4 (which is a wireless connection), but is one for the iMac.
    In any case I followed the above instructions and your suggestions and keep getting the above alert. Do you have any other suggestions?
    Thanks

  • Image Capture and/or Canon MF4350d -- How do I set up Auto Document Feeder?

    I can't find a setting for it within Image Capture, and I was told by a Canon customer service agent that she had a similar customer with a similar problem who had to get some updated Image Capture software from Apple to fix the problem. If that's true, I looked for the Image Capture software but couldn't find it, and if not, I'd love to know how to make the ADF work for me. The printer says it can do it, but I can't get my computer to ask the right way...
    thanks in advance for your help!

    Hello there and welcome to Apple Discussions.
    I am not aware of a new version of Image Capture, apart from the one that is included with 10.6 but this is not available for 10.5.
    I don't have an MF4300 series to test (I have the MF4680 and 4270) so I cannot check the settings you should see with the Canon ScanGear application for your MF4350. However, I think the issue is that Image Capture does not open the Scan Gear viewer and therefore you do not get the option of where to scan from. So instead of using Image Capture to scan, try using Preview and selecting the MF4350 via the File > Import Image menu.
    Pahu

  • IPhone 3G's camera roll empty on Image Capture (and iPhoto)

    I have 11 photos on the iPhone. I have loaded them to MobileMe, but they are scaled down with no EXIF data. The iPhone loads fine in iTunes, and the device can be seen by Image Capture and iPhoto. These apps just can't see the Camera Roll with the 11 photos. I have tried resetting everything but nothing works.
    Anyone got any ideas?

    The sync DOES NOT copy off pictures for you (yes it is part of backup file though, but not image files you can touch).
    iTunes CAN sync pictures TO the phone but not to Camera Roll.
    The Camera Roll is a special partition on the phone that when connected to a computer acts like *any other* digital camera. Thus to take pictures off the camera roll, you use what ever software you use to take off pictures of any of your digital cameras (as for Windows, it has the default Camera/Scanner wizard that it will normally offer up unless you told it to stop suggesting it).
    So once connected, no sync is needed. But your PC (unless you changed default settings in Windows as it has nothing to do with iTunes) will prompt you about a camera being attached and what do you want it to do.
    Even if it doesn't ask, it should show up under My Computer and you can just browse to it and copy the images off.

  • Deleted Image Capture and iPhoto...oops...Now What?

    Hi, all. Like the title suggests, I removed Image Capture and iPhoto from my computer several months ago, thinking, "when will I ever need to hook up a digital camera?" Heh. The installer disks are with my parents several hundred miles away, and so getting them re-installed that way would be at best a hassle, plus it appears that iPhoto can't be re-installed once deleted without the original version installed to upgrade from. So, now what? Is there some place I can download Image Capture, in particular? I'm not a big user of iPhoto (hence the deletion), but getting Image Capture back would be...good. Any ideas?
    Thanks,
    Greg Turnipseed

    Hi, Allan. The versions of iPhoto I tried to install came off the OS installer disks. I'd tried installing the version that came with 10.3 with the intent of running Software Update and pulling it up to the latest version (I still have the 10.3 disks here), but it didn't work. I also tried installing the version that came with 10.5 the last time I was at my parents', but it claimed that it couldn't find a copy of iPhoto to upgrade. I'm sure with iLife, that wouldn't be a problem, but I haven't purchased iLife.
    I was afraid the only place to find Image Capture would be on the installer disk. I'll pester my parents for it the next time I'm down there.
    Thanks for your help,
    Greg

  • I imported about 300 RAW images yesterday and worked with them for about an hour. iPhoto locked up on me and I rebooted. After I did the event icon is now gray and it says there are no photos. I know the photos are there. Any idea how I can recover them?

    I imported about 300 RAW images yesterday and worked with them for about an hour. iPhoto locked up on me and I rebooted. After I did the event icon for that event is now gray and it says there are no photos. I know the photos are there. Any idea how I can recover them?

    a best practice to is to never have any computer program (including iPhoto) delete the photos from the card but to import the photos and keep them and then after at least one successful backup cycle has completed and then reformat the card --  I use three very large (32 GB) cards in rotation so I do not reformat for typically a year or more giving me one more long term backup of my photos
    Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library database
    LN

Maybe you are looking for

  • Restore iPhoto after hard drive has been wiped?

    My Macbook Pro Hard Drive recently failed and the Apple store wiped it clean. I had a number of important photos on iPhoto and I am wondering if there is any way to retrieve these? Being that they were added recently to my computer via my iPhone (the

  • How to get REGUP-ZFBDT

    Hi! I am working on a sapscript form whose standard print program uses tables regup, reguh and regud. As much as possible, I would not like to modify te standard print program to I am working on the fields available. However, one of the information t

  • SAP - XI -Barcode system

    Hi, I have a requirement. As soon as a new PO gets generated in my SAP ECC the data should flow to a barcode system for some processing. I would like to know how can i do it with or without XI ...? Please help...

  • Difference between two dates into server behaviors

    Good morning all, I'm trying to create a recordset using server behaviors and as I'm not an expert using php I'm completely lost... The problem is the following : I want to find into a table all the records where the difference between today date and

  • Analytics server 1.1

    I installed analytics server 1.1. Installation went successfully. When I loaded analytics console community, I get javascript error PTHTTPGetRequest is undefined. Any idea what is creating this problem: I have win2003 server/portal 5.03 .NET/Sql 2000