graphic

Determine if an image file is a photo or a graphic?

牧云@^-^@ 提交于 2019-12-12 08:04:23
问题 I'm embarking on what I believe may be somewhat of an experiment... To come up with (or discover, as it could already exist) a method to determine whether a given image file, regardless of format, is a photo or a graphic. "Photo" meaning something like scenery, people, etc. V.S. "Graphic" meaning an icon, illustration, chart, UI screenshot, etc. I came up with a nice PHP / ImageMagick script in the past week which pulls statistics from image files and nicely applies fixes to white balance,

Java Swing show progress in pie form

主宰稳场 提交于 2019-12-12 07:22:49
问题 I want to show a progress in pie format. Can anyone help? I have the data to show, but how to show it in this format. Something like progress shown in Google Chrome when we download files. 回答1: Based on the links provided by @trashgod, here is one way you can achieve a "Pie" effect. This only handles the indeterminate progress bar, but it would be very easy to add the "determinate" behaviour. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt

Does Java have any known issues with Images and displaying them

懵懂的女人 提交于 2019-12-12 05:27:58
问题 I am new to Java but not new to graphics I'm trying to expand my understanding with a project in which I'm displaying many photos of items using JLabels and Icons to display them, The items pictures are garnished from various locations on the net and so many sources. I've converted these into PNG files as they have transparent backgrounds to them. Thing is I wasted a whole weekend recently checking and re-checking some code because one item just would not display, following the logic to its

Print hierarchical vertices in a graph [closed]

匆匆过客 提交于 2019-12-12 03:45:35
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . How to print all the parents of a given node. 回答1: Graham's answer is okay, but uses expensive path computations, which are not really required for your use-case. This is how I've set up your graph: g = TinkerGraph.open().traversal() g.addV().property(id, 1).as("v1"). addV()

DrawEllipse: Antialiasing broken with PenAlignment.Inset

耗尽温柔 提交于 2019-12-11 20:13:00
问题 As suggested by @TaW on this previous question, I setted PenAlignment.Inset to draw the circle inside the Bitmap, but this caused another problem. I want to draw a circle on a specified Bitmap with antialiasing. SmoothingMode.AntiAlias The problem is that, when I use PenAlignment.Inset , the antialiasing doesn't work correctly! Instead, with PenAlignment.Center , it works correctly... Any suggestion to resolve this problem? Bitmap layer = new Bitmap(80, 80); using (Graphics g = Graphics

Drawing on a JPanel

核能气质少年 提交于 2019-12-11 00:33:09
问题 I'm start with create RubicPanel class extended from JPanel from NetbeanIDE set it to black background, put it on a JFrame and I start to draw on it by using another class like this. public class Drow { private final int SquareSize = 99; public void DrowRubic(RubicEntity GameRubic, RubicPanel rPanel) { Graphics g = rPanel.getGraphics(); g.setColor(Color.pink); g.fillRect(0, 0, 301, 301); int CurrentFace = GameRubic.getDirection(1); for(int i=0; i<3; i++) { for(int j=0; j<3; j++) { DrowSquare

How to Optimize this Image convolution filter Method in MonoTouch?

旧时模样 提交于 2019-12-08 07:37:37
问题 After having realized that no realtime graphics effect library exists for MonoTouch, I decided to write my own. After some research I've written a convolution method that works perfectly but, even using unsafe code, is VERY SLOW. What I'm doing wrong? Is there some optimization that I'm missing? Here is my c# class, any suggestion, not matter how small, is welcome! using System; using System.Drawing; using MonoTouch.CoreGraphics; using System.Runtime.InteropServices; using MonoTouch.UIKit;

Create paired boxplots, from 2 distinct dataframes

时光总嘲笑我的痴心妄想 提交于 2019-12-08 01:01:32
问题 I would like to create a graphic with box plot in R. I got the following data frames: > drools_responseTimes_numberOfClients_REST X1 X5 X10 X20 X50 1 816 183 699 154 297 2 366 280 1283 345 291 3 103 946 1609 409 377 4 431 1086 1974 482 479 5 90 1379 2083 567 557 6 290 511 2184 910 925 7 134 770 2283 980 1277 8 480 1547 2416 1069 1752 9 275 1727 2520 1141 1846 10 67 679 2616 1188 1935 > javascript_responseTimes_numberOfClients_REST X1 X5 X10 X20 X50 1 334 497 610 439 417 2 445 894 859 826 588

Create paired boxplots, from 2 distinct dataframes

泄露秘密 提交于 2019-12-06 10:50:37
I would like to create a graphic with box plot in R. I got the following data frames: > drools_responseTimes_numberOfClients_REST X1 X5 X10 X20 X50 1 816 183 699 154 297 2 366 280 1283 345 291 3 103 946 1609 409 377 4 431 1086 1974 482 479 5 90 1379 2083 567 557 6 290 511 2184 910 925 7 134 770 2283 980 1277 8 480 1547 2416 1069 1752 9 275 1727 2520 1141 1846 10 67 679 2616 1188 1935 > javascript_responseTimes_numberOfClients_REST X1 X5 X10 X20 X50 1 334 497 610 439 417 2 445 894 859 826 588 3 306 1143 1123 1407 791 4 301 1442 1445 1806 1005 5 257 1754 1857 2209 1235 6 181 507 2078 2493 1441 7

How can I make my n-resize display correctly?

此生再无相见时 提交于 2019-12-04 18:13:02
Here is modified code originally tooken from this post . Resizing the rectangle on the Right middle, bottom middle and right bottom control point is fine as I don't need to change the translate coordinates in order to make the resize work. Now my problem as you can see is that my resizing on the top middle (same for the left middle, left bottom...) of my rectangle when the rotate angle is different from 0 doesn't work as it visually changes position when I resize it. I really don't know how to change that so any help is highly appreciated. note: change angle to 0 in the input field and you'll