Search Results

Search found 25888 results on 1036 pages for 'image map'.

Page 84/1036 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • Best way to pass image to server?

    - by Chris
    I have an SL3 application that needs to be able to pass an image to the server, and then the server will generate a PDF file with the image in it, and display it to the user. What I already have in place are the following: (1) Code to convert image to byte array (2) Code to generate PDF file with image The main problem that I am running into is the following: In order to bypass the pop-up blocker, which is a requirement for my application, I am using the following code: var button = new NavigationButton(); button.NavigateUri = new Uri("http://localhost:3616/PrintReport.aspx?ReportIndex=11&ActionType=Get&ReportIdentifier=" + reportIdentifier.ToString() + ""); button.TargetName = "_blank"; button.PerformClick(); Initially, I would pass the image to a WCF web service (as a byte array), and then "navigate" to the ASP.NET page that would display the report. However, if I do this, then I can not use my custom HyperlinkButton class, and, certain browsers, including Safari, will block a new window from opening up. Therefore, it appears that the only option is to use the HyperlinkButton class. What I need to be able to do is to somehow pass the image, as a byte array or some other data type, to the server, such that it can temporarily store the image, even if it is in a server variable, and then immediately retrieve it when I navigate to the PrintReport.aspx page. If I upload the image to an ASP.NET form and then use the HyperlinkButton class to navigate to the PrintReport page, it doesn't work, as the app navigates to the PrintReport page before the system has finished uploading the image. I can't pass it to a web service, as that would require that I navigate to the PrintReport.aspx page in the callback code of the web method that I would be passing the image to, and the HyperlinkButton will not allow that, based on security rules. Any help or ideas would be appreciated. Thanks. Chris

    Read the article

  • map based on specific type of stream

    - by Steven Penny
    Consider the following file Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infile.mp4': Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1038 Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 386 kb/s Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 124 kb/s I would like to run a command that uses the video and only the stereo audio. With this particular file I could just run ffmpeg -i infile.mp4 -c copy -map v -map :2 outfile.mp4 However this will not work if the audio streams are switched. How can I tell FFmpeg to use the 2 channel audio only?

    Read the article

  • Displaying map stl

    - by BSchlinker
    Declared a map early on: map<char*,char*> rtable; // used to store routing information Now I'm attempting to display the contents of the map: void Routes::viewroutes(){ typedef map<char*, char*>::const_iterator iter; for (iter=rtable.begin(); iter != rtable.end(); ++iter) { cout << iter->second << " " << iter->first << endl; } } Receiving the error "expected primary-expression before '!=' token and for '-' token. Can't seem to understand the error I'm making here. Any ideas?

    Read the article

  • Algorithm to determine which points should be visible on a map based on zoom

    - by lgratian
    Hi! I'm making a Google Maps-like application for a course at my Uni (not something complex, it should load the map of a city for example, not the whole world). The map can have many layers, including markers (restaurants, hospitals, etc.) The problem is that when you have many points and you zoom out the map it doesn't look right. At this zoom level only some points need to be visible (and at the maximum map size, all points). The question is: how can you determine which points should be visible for a specified zoom level? Because I have implemented a PR Quadtree to speed up rendering I thought that I could define some "high-priority" markers (that are always visible, defined in the map editor) and put them in a queue. At each step a marker is removed from the queue and all it's neighbors that are at least D units away (D depends on the zoom levels) are chosen and inserted in the queue, and so on. Is there any better way than the algorithm I thought of? Thanks in advance!

    Read the article

  • accessing values in a Map container, whose values were passed on as a stream

    - by wilson88
    I am trying to get access to the object values of the objects that were sent as a stream from one class to ano ther.Aparently I can view the objects via their keys but am not so sure how to get to the values.ie Bid- values trdId,qty, price. If possible you can demostrate how I can make comparison for the prices in the containers buyers and sellers for the prices. code is as below: void Auctioneer::printTable(map bidtable) { map<int, Bid*>::const_iterator iter; cout << "\t\tBidID | TradID | Type | Qty | Price \n\n"; for(iter=bidtable.begin(); iter != bidtable.end(); iter++)//{ cout << iter->second->toString() << endl<<"\n"; //------------------------------------------------------------------------- // Creating another map for the sellers. cout<<"These are the Sellers bids\n\n"; map<int, Bid*> sellers(bidtable); sellers.erase(10);sellers.erase(11);sellers.erase(12);sellers.erase(13);sellers.erase(14); sellers.erase(15);sellers.erase(16); sellers.erase(17);sellers.erase(18);sellers.erase(19); for(iter=sellers.begin(); iter != sellers.end(); iter++) cout << iter->second->toString() << endl<<"\n"; //-------------------------------------------------------------------------- // Creating another map for the sellers. cout<<"These are the Buyers bids\n\n"; map<int, Bid*> buyers(bidtable); buyers.erase(0);buyers.erase(1);buyers.erase(2);buyers.erase(3);buyers.erase(4);buyers.erase(5); buyers.erase(6);buyers.erase(7); buyers.erase(8);buyers.erase(9); for(iter=buyers.begin(); iter != buyers.end(); iter++) //sellers.erase(10); cout << iter->second->toString() << endl<<"\n";

    Read the article

  • Unable to display Google Map through API in Flex SDK

    - by Spero.ShiroPetto
    Hello, I am using the mxmlc to compile the examples from google to get started in using Google Maps API in Flex 4. But after compiling the swf file the map does not load. I've registered for an API key Downloaded and included the Maps SDK in the xml config file used at compile time C:\sdk\flex4\frameworks\flex-config.xml <external-library-path> <path-element>libs/google/maps/lib/map_flex_1_18.swc</path-element> </external-library-path> Foo.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="{KEY}"/> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); } ]]> </mx:Script> </mx:Application> Any tips on where to go from here? I can compile a basic flex project without problem and displays the components I put in so i'd imagine it's something to do with the API Key? Thanks for the help

    Read the article

  • Select points on a map

    - by Dave Hanna
    I am just beginning design work on a problem that I'm sure has been solved before. In a web based application, I need to: a) present a map b) place a set of points (map-pins) on the map c) allow the user at his browser to draw a simple closed curve on the map with his mouse d) send the path of that curve back to the server e) on the server, select from the set of points those that are within the closed curve. What are the best API's to use for this problem? (I know I can and will do more research with Google, but I'm figuring there is probably someone who has done this that can give me some pointers to narrow my search space.) Thanks.

    Read the article

  • From and Image to an ImageSource

    - by akaphenom
    I have an image (embedded resource) that i can get access to and form an Image object from. I actually can get the Image object or the Stream of bits the represent the image. However I want to sue that image programaticly to be a background image. So how do I set the ImageSource on the ImageBrush to an AcutalImage (PNG)?

    Read the article

  • Adding Google Map to Contact Info Page in Drupal

    - by clang1234
    I'm trying to display a Google Map inside a drupal page. The map will only have the business location marker on it, with no need for a user to submitted their own markers. So far I've loaded the Gmap, Location, and CCK modules. I've attempted to enable a location field for Page content types, which allows me to input an address, but this doesn't display the actual map. I'm sure I'm missing something simple here. Any help?

    Read the article

  • Problem exporting NSOpenGLView pixel data to some image file formats using ImageKit & CGImageDestina

    - by walkytalky
    I am developing an application to visualise some experimental data. One of its functions is to render the data in an NSOpenGLView subclass, and allow the resulting image to be exported to a file or copied to the clipboard. The view exports the data as an NSImage, generated like this: - (NSImage*) image { NSBitmapImageRep* imageRep; NSImage* image; NSSize viewSize = [self bounds].size; int width = viewSize.width; int height = viewSize.height; [self lockFocus]; [self drawRect:[self bounds]]; [self unlockFocus]; imageRep=[[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:width pixelsHigh:height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:width*4 bitsPerPixel:32] autorelease]; [[self openGLContext] makeCurrentContext]; glReadPixels(0,0,width,height,GL_RGBA,GL_UNSIGNED_BYTE,[imageRep bitmapData]); image=[[[NSImage alloc] initWithSize:NSMakeSize(width,height)] autorelease]; [image addRepresentation:imageRep]; [image setFlipped:YES]; // this is deprecated in 10.6 [image lockFocusOnRepresentation:imageRep]; // this will flip the rep [image unlockFocus]; return image; } Copying uses this image very simply, like this: - (IBAction) copy:(id) sender { NSImage* img = [self image]; NSPasteboard* pb = [NSPasteboard generalPasteboard]; [pb clearContents]; NSArray* copied = [NSArray arrayWithObject:img]; [pb writeObjects:copied]; } For file writing, I use the ImageKit IKSaveOptions accessory panel to set the output file type and associated options, then use the following code to do the writing: NSImage* glImage = [glView image]; NSRect rect = [glView bounds]; rect.origin.x = rect.origin.y = 0; img = [glImage CGImageForProposedRect:&rect context:[NSGraphicsContext currentContext] hints:nil]; if (img) { NSURL* url = [NSURL fileURLWithPath: path]; CGImageDestinationRef dest = CGImageDestinationCreateWithURL((CFURLRef)url, (CFStringRef)newUTType, 1, NULL); if (dest) { CGImageDestinationAddImage(dest, img, (CFDictionaryRef)[imgSaveOptions imageProperties]); CGImageDestinationFinalize(dest); CFRelease(dest); } } (I've trimmed a bit of extraneous code here, but nothing that would affect the outcome as far as I can see. The newUTType comes from the IKSaveOptions panel.) This works fine when the file is exported as GIF, JPEG, PNG, PSD or TIFF, but exporting to PDF, BMP, TGA, ICNS and JPEG-2000 produces a red colour artefact on part of the image. Example images are below, the first exported as JPG, the second as PDF. Copy to clipboard does not exhibit this red stripe with the current implementation of image, but it did with the original implementation, which generated the imageRep using NSCalibratedRGBColorSpace rather than NSDeviceRGBColorSpace. So I'm guessing there's some issue with the colour representation in the pixels I get from OpenGL that doesn't get through the subsequent conversions properly, but I'm at a loss as to what to do about it. So, can anyone tell me (i) what is causing this, and (ii) how can I make it go away? I don't care so much about all of the formats but I'd really like at least PDF to work.

    Read the article

  • How to center map on marker and open marker's InfoWindow in one method

    - by sMariusz
    I'm using Google Map APIv2. On my webpage I've a sidebar containing a list of markers with onclick event executing showDetails method, that looks like: GMarker.prototype.showDetails=function() { map.panTo(this.getLatLng()); this.openInfoWindowHtml(this.details); }; The problem is that i cannot both panTo and openInfoWindowHtml in one method, it pans but won't open tooltip and when i change method to: GMarker.prototype.showDetails=function() { this.openInfoWindowHtml(this.details); map.panTo(this.getLatLng()); }; it opens tooltip but won't center map to the marker's anchor coordinates. Even using wait function doesn't solve my problem. What am I doing wrong?

    Read the article

  • Excel: Plot order total in map coordinates

    - by Phliplip
    I have a set of data that looks like this: -X--Y----Amount- AE 24 $178,00 Y 27 $162,00 AD 34 $680,00 AK 35 $178,00 Y 25 $29,00 U 23 $178,00 X 38 $193,00 AC 30 $226,00 AK 39 $152,00 AJ 34 $217,00 AC 35 $183,00 AA 22 $211,00 Z 19 $172,00 AJ 32 $187,00 AF 26 $272,00 AI 27 $220,00 AJ 34 $320,00 AB 32 $183,00 AB 35 $272,00 AC 32 $207,00 AB 28 $178,00 AC 30 $168,00 AC 28 $178,00 AB 32 $310,00 AD 30 $188,00 AB 35 $188,00 The sample above is only an excerpt of the total dataset of 16K rows Each row represents a single delivery order, where the 2 first columns are the map coordinate and the third the purchase amount. Would it be possible to plot the above data in a chart or coordinate system. Where the each plot should be a summary of all sales in the same map coordinate. Also a similar chart of order count would be nice to have.

    Read the article

  • Designing a WPF map control.

    - by Dylan
    I'm thinking about making a simple map control in WPF, and am thinking about the design of the basic map interface and am wondering if anyone has some good advice for this. What I'm thinking of is using a ScrollViewer (sans scroll bars) as my "view port" and then stacking everything up on top of a canvas. From Z-Index=0 up, I'm thinking: Base canvas for lat/long calculations, control positioning, Z-Index stacking. Multiple Grid elements to represent the maps at different zoom levels. Using a grid to make tiling easier. Map objects with positional data. Map controls (zoom slider, overview, etc). Scroll viewer with mouse move events for panning and zooming. Any comments suggestions on how I should be building this?

    Read the article

  • Google map in jsp document

    - by Todd
    Hi, I am trying to implement google map api into one of my web page which is generated by jsp document, and I am having trouble getting it work. I found some jsp taglibrary by www.lamatek.com/GoogleMaps, but it doesn't seem to work.(I mean even examples on their web site don't work) Has anyone done work on google map in jsp document? I can really use some help or advice.(It seems like jsp docuemnt and javascript just don't get along) p.s I can get static google map work, but that's not my client wants.

    Read the article

  • resttemplate getForObject map responsetype

    - by Zack Macomber
    I'm invoking a rest service that returns JSON like this: { "some.key" : "some value", "another.key" : "another value" } I would like to think that I can invoke this service with a java.util.Map as the response type but that's not working for me. I get this exception: org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [interface java.util.Map] Should I just specify String as the response type and convert the JSON to a Map?

    Read the article

  • When using Clipboard, Toolkit and Transferable, I get an error objecting to image width and height

    - by Mike King
    When I run the following code it triggers an error message. The error message is shown below the code. What code changes, or changes to the image file, are needed to fix this error? Help will be appreciated. import java.awt.*; import java.awt.datatransfer.*; public class LoadToClipboard { public static void main( String [] args ) { Toolkit tolkit = Toolkit.getDefaultToolkit(); Clipboard clip = tolkit.getSystemClipboard(); clip.setContents( new ImageSelection( tolkit.getImage("StackOverflowLogo.png")) , null ); } } class ImageSelection implements Transferable { private Image image; public ImageSelection(Image image) { this.image = image; } // Returns supported flavors public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[]{DataFlavor.imageFlavor}; } // Returns true if flavor is supported public boolean isDataFlavorSupported(DataFlavor flavor) { return DataFlavor.imageFlavor.equals(flavor); } // Returns image public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException { if (!DataFlavor.imageFlavor.equals(flavor)) { throw new UnsupportedFlavorException(flavor); } return image; } } Exception in thread "main" java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0 at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999) at sun.awt.datatransfer.DataTransferer.imageToStandardBytes(DataTransferer.java:1994) at sun.awt.windows.WDataTransferer.imageToPlatformBytes(WDataTransferer.java:267) at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1123) at sun.awt.windows.WDataTransferer.translateTransferable(WDataTransferer.java:163) at sun.awt.windows.WClipboard.setContentsNative(WClipboard.java:73) at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:93) at automateSignature.LoadToClipboard.main(LoadToClipboard.java:8) I have tried to find a place in the code where width and height can be specified, but have not succeeded. I also examined the properties of the jpg file and the w and h are specified.enter code here

    Read the article

  • Create two semi-transparent images that when stacked produce the target image

    - by posfan12
    Due to CSS limitations I am forced to stack to semi-transparent images on my website. I won't go into detail regarding the CSS since if I can get this question answered the problem is moot. Anyway, I would like to modify image A in the GIMP such that it will look like it did originally after being stacked on top of image B. Both image A and image B have their opacities set to 50%. Image B is a solid color throughout, whereas image A has some minor details such as a gradient. Here's what it looks like before image B is applied on top (and what it should look like in the end): [URL=http://s421.photobucket.com/albums/pp292/SharkD2161/Support/Website/?action=view&current=website_testing_target_image.png][IMG]http://i421.photobucket.com/albums/pp292/SharkD2161/Support/Website/th_website_testing_target_image.png[/IMG][/URL] Here's what it looks like after image B has been applied on top: [URL=http://s421.photobucket.com/albums/pp292/SharkD2161/Support/Website/?action=view&current=website_testing_undesired_result.png][IMG]http://i421.photobucket.com/albums/pp292/SharkD2161/Support/Website/th_website_testing_undesired_result.png[/IMG][/URL] Thanks! Mike

    Read the article

  • NSBitmapImageRep data Format as application icon image??

    - by Joe
    i have a char* array of data that was in RGBA and then moved to ARGB Bottom line is the set application image looks totally messed up and i cant put my finger on why? //create a bitmap representation of the image data. //The data is expected to be unsigned char** NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes : (unsigned char**) &dest pixelsWide:width pixelsHigh:height bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO colorSpaceName:NSDeviceRGBColorSpace bitmapFormat:NSAlphaFirstBitmapFormat bytesPerRow: 0 bitsPerPixel:0 ]; NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize(width, height)]; [image addRepresentation:bitmap]; if( image == NULL) { printf("image is null\n"); fflush(stdout); } [NSApp setApplicationIconImage :image]; What in these values is off? the image looks very multicolored and pixelated, with transparent parts/lines as well.

    Read the article

  • Make Map Key Sorted According To Insert Sequence

    - by Yan Cheng CHEOK
    Without help from additional container (like vector), is it possible that I can make map's key sorted same sequence as insertion sequence? #include <map> #include <iostream> using namespace std; int main() { map<const char*, int> m; m["c"] = 2; m["b"] = 2; m["a"] = 2; m["d"] = 2; for (map<const char*, int>::iterator begin = m.begin(); begin != m.end(); begin++) { // How can I get the loop sequence same as my insert sequence. // c, b, a, d std::cout << begin->first << std::endl; } getchar(); }

    Read the article

  • Using Scala and StringTemplate, how do I loop through a Map

    - by Marcus Kazmierczak
    I have my environment setup nicely using Scala, StringTempalte within the Google AppEngine. I am having trouble looping through a Map and getting it to display in the template. When I assign a simple List of just Strings to the template it works using: In Scala Servlet: var photos = List[String]() //... get photo url and title ... photos = photo_url :: photos template.setAttribute("photos", photos: _*) In Template: $photos: { photo| <div><img src="$photo$_s.jpg"></div> }$ The above works. However, any attempt of creating a Map using url and title and assigning to the template gives me an error. Here is my attempt, which does not work: In Scala Servlet: var photos = List[Map[String,String]]() //... get photo url and title ... photos = Map("url" -> url, "title" -> title) :: photos template.setAttribute("photos", photos: _*) In Template: $photos: { photo| <div><img src="$photo.url$_s.jpg" title="$photo.title$"></div> }$ This gives me the following error Class scala.collection.immutable.Map$Map2 has no such attribute: title in template context Thoughts / Ideas ?

    Read the article

  • Map mouse xbuttons to keypress?

    - by Will
    Hi, the utilities that come with my HP vector mouse are fairly basic. My old logitech G9, the best mouse ever made (except when it gets senile and starts having 'gaps') had a utility to map each of the buttons to a keypress, which I use in games, such as xbutton1 and 2 for run, etc. is there a utility, or a way, that I can map the 2 xbuttons on my new mouse so that they generate/simulate a keypress? I'm wondering if there are built in mappings in Windows that do this already, and its just a case of finding out what the keypresses are? thanks, Will

    Read the article

  • WPF Image Button formatting

    - by Sonic Soul
    If I create a button with an image inside, it gets blown up to much larger size than the image. If i try to constrain the size of image, and container button, the image gets cut off: <Button Background="Transparent" Width="18" Height="18" Margin="0,0,0,0" Padding="0,0,0,0" BorderBrush="{x:Null}"> <Image Width="16" Height="16" /> </Button> Native image size is 16x16. Here the button is 18x18 with 0 padding, yet the image still gets cut-off on right/bottom. how can i make the entire button be exactly the size of the image w/out any cut off?

    Read the article

  • Need to create street maps images with route plotted from address 1 to address 2

    - by daustin777
    I'm looking for software to create street map images that show the route from address 1 to address 2. It needs to be able to create the map images from either a database file that contains the addresses, a delimited text file that lists the addresses to route in each row, or an Excel file. I need to do this to create custom maps in bulk- 500 to 20,000 quantity from the data file. The purpose is to provide a map with a route from a location (address 1) to a retail store (address 2). The maps will be printed on a postcard. I have the data. I just need the mapping software. Is there software available that can do this?

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >