I'm new in MATLAB and using it for some medical analysis. I have a matrix which contains a circular shape in it. Here is a sample:
0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 1 0 1 1 0 0 0
0 0 1 0 0 0 0 1 0 0
0 1 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 1 1 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
This matrix has been computed by this line:
egslbr= edge(slbr,'log');
Where slbr is my image. By merging the egslbr with my slbr I get the image bellow.
I want to cancel all the color pixel outside the greenish circle. Is there any way to do this?
You should be able to create a mask from your circle (assuming it's a complete circle -- the sample matrix you gave has a gap in it which makes this much more difficult, but I'm going to assume that was a mistake). Here's a simple way of doing it:
mask = ~cumsum(egslbr) | ~cumsum(egslbr,'reverse');
slbr(mask) = 0;
This should set every pixel outside the circle (not including the edge of the circle though) to zero.
I am trying to upload a 57.86GB file to an azure storage blob container and noticing that it fails regularly only on Chrome 75.0.3770.100 (Official Build) (64-bit) on MacOS Mojave 10.14.3
We are splitting the file into 4MB blocks and have 6 connections open.
When it fails, the PUT request stalls/timesout and the upload halts.
Has anyone run across similar issues? Does anyone have an idea as to where to look next to debug this issue?
Here are the logs that we got from chrome://net-export
285748: URL_REQUEST
https://i_removed_this.blob.core.windows.net/i_removed_this
Start Time: 2019-06-21 14:34:34.320
t=178854 [st= 0] +REQUEST_ALIVE [dt=30624]
--> priority = "MEDIUM"
--> url = "https://i_removed_this.blob.core.windows.net/i_removed_this"
t=178855 [st= 1] NETWORK_DELEGATE_BEFORE_URL_REQUEST [dt=0]
t=178855 [st= 1] +URL_REQUEST_START_JOB [dt=30623]
--> load_flags = 832 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES)
--> method = "PUT"
--> privacy_mode = 1
--> upload_id = "0"
--> url = "https://i_removed_this.blob.core.windows.net/i_removed_this"
t=178855 [st= 1] NETWORK_DELEGATE_BEFORE_START_TRANSACTION [dt=0]
t=178855 [st= 1] HTTP_CACHE_GET_BACKEND [dt=0]
t=178855 [st= 1] HTTP_CACHE_OPEN_OR_CREATE_ENTRY [dt=0]
--> net_error = -2 (ERR_FAILED)
t=178855 [st= 1] +HTTP_STREAM_REQUEST [dt=0]
t=178855 [st= 1] HTTP_STREAM_JOB_CONTROLLER_BOUND
--> source_dependency = 285750 (HTTP_STREAM_JOB_CONTROLLER)
t=178855 [st= 1] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 285751 (HTTP_STREAM_JOB)
t=178855 [st= 1] -HTTP_STREAM_REQUEST
t=178855 [st= 1] UPLOAD_DATA_STREAM_INIT [dt=1]
--> is_chunked = false
--> net_error = 0 (?)
--> total_size = 4000000
t=178856 [st= 2] +HTTP_TRANSACTION_SEND_REQUEST [dt=185]
t=178856 [st= 2] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> PUT /i_removed_this HTTP/1.1
Host: i_removed_this.blob.core.windows.net
Connection: keep-alive
Content-Length: 4000000
Accept: application/json, text/plain, */*
Origin: https://i_removed_this.com/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Content-Type: application/json;charset=utf-8
Referer: https://i_removed_this.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
t=178856 [st= 2] HTTP_TRANSACTION_SEND_REQUEST_BODY
--> did_merge = false
--> is_chunked = false
--> length = 4000000
t=178856 [st= 2] UPLOAD_DATA_STREAM_READ [dt=1]
--> current_position = 0
t=178857 [st= 3] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 16384
t=178857 [st= 3] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 32768
... removed most of the UPLOAD_DATE_STREAM_READ events for conciceness
t=179040 [st= 186] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 3981312
t=179041 [st= 187] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 3997696
t=179041 [st= 187] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 4000000
t=179041 [st= 187] -HTTP_TRANSACTION_SEND_REQUEST
t=179041 [st= 187] +HTTP_TRANSACTION_READ_HEADERS [dt=30437]
t=179041 [st= 187] HTTP_STREAM_PARSER_READ_HEADERS [dt=30437]
--> net_error = -7 (ERR_TIMED_OUT)
t=209478 [st=30624] -HTTP_TRANSACTION_READ_HEADERS
--> net_error = -7 (ERR_TIMED_OUT)
t=209478 [st=30624] -URL_REQUEST_START_JOB
--> net_error = -7 (ERR_TIMED_OUT)
t=209478 [st=30624] URL_REQUEST_DELEGATE_RESPONSE_STARTED [dt=0]
t=209478 [st=30624] -REQUEST_ALIVE
--> net_error = -7 (ERR_TIMED_OUT)
285750: HTTP_STREAM_JOB_CONTROLLER
https://i_removed_this.blob.core.windows.net/i_removed_this
Start Time: 2019-06-21 14:34:34.321
t=178855 [st=0] +HTTP_STREAM_JOB_CONTROLLER [dt=0]
--> is_preconnect = false
--> url = "https://i_removed_this.blob.core.windows.net/i_removed_this"
t=178855 [st=0] HTTP_STREAM_JOB_CONTROLLER_BOUND
--> source_dependency = 285748 (URL_REQUEST)
t=178855 [st=0] +PROXY_RESOLUTION_SERVICE [dt=0]
t=178855 [st=0] PROXY_RESOLUTION_SERVICE_RESOLVED_PROXY_LIST
--> pac_string = "DIRECT"
t=178855 [st=0] -PROXY_RESOLUTION_SERVICE
t=178855 [st=0] HTTP_STREAM_JOB_CONTROLLER_PROXY_SERVER_RESOLVED
--> proxy_server = "DIRECT"
t=178855 [st=0] HTTP_STREAM_REQUEST_STARTED_JOB
--> source_dependency = 285751 (HTTP_STREAM_JOB)
t=178855 [st=0] -HTTP_STREAM_JOB_CONTROLLER
285751: HTTP_STREAM_JOB
https://i_removed_this.blob.core.windows.net/
Start Time: 2019-06-21 14:34:34.321
t=178855 [st=0] +HTTP_STREAM_JOB [dt=0]
--> expect_spdy = false
--> original_url = "https://i_removed_this.blob.core.windows.net/"
--> priority = "MEDIUM"
--> source_dependency = 285750 (HTTP_STREAM_JOB_CONTROLLER)
--> url = "https://i_removed_thisblob.core.windows.net/"
--> using_quic = false
t=178855 [st=0] HTTP_STREAM_JOB_WAITING [dt=0]
--> should_wait = false
t=178855 [st=0] +HTTP_STREAM_JOB_INIT_CONNECTION [dt=0]
t=178855 [st=0] +HOST_RESOLVER_IMPL_REQUEST [dt=0]
--> address_family = 0
--> allow_cached_response = true
--> host = "i_removed_this.windows.net:443"
--> is_speculative = false
t=178855 [st=0] HOST_RESOLVER_IMPL_IPV6_REACHABILITY_CHECK
--> cached = true
--> ipv6_available = false
t=178855 [st=0] -HOST_RESOLVER_IMPL_REQUEST
--> net_error = -804 (ERR_DNS_CACHE_MISS)
t=178855 [st=0] TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET
--> group_id = "i_removed_this.blob.core.windows.net:443"
t=178855 [st=0] +SOCKET_POOL [dt=0]
t=178855 [st=0] SOCKET_POOL_REUSED_AN_EXISTING_SOCKET
--> idle_ms = 3
t=178855 [st=0] SOCKET_POOL_BOUND_TO_SOCKET
--> source_dependency = 253875 (SOCKET)
t=178855 [st=0] -SOCKET_POOL
t=178855 [st=0] -HTTP_STREAM_JOB_INIT_CONNECTION
t=178855 [st=0] HTTP_STREAM_JOB_BOUND_TO_REQUEST
--> source_dependency = 285748 (URL_REQUEST)
t=178855 [st=0] -HTTP_STREAM_JOB
The difference between this and a successfull URL_request is that the URL_REQUEST doesn't time out and we are properly able to read the response headers as seen below:
t=179171 [st=321] +HTTP_TRANSACTION_READ_HEADERS [dt=225]
t=179171 [st=321] HTTP_STREAM_PARSER_READ_HEADERS [dt=225]
t=179396 [st=546] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 201 Created
Content-Length: 0
Content-MD5: i_removed_this
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: i_removed_this
x-ms-version: 2017-04-17
x-ms-request-server-encrypted: true
Access-Control-Expose-Headers: x-ms-request-id,Server,x-ms-version,Content-MD5,x-ms-request-server-encrypted,Content-Length,Date,Transfer-Encoding
Access-Control-Allow-Origin: *
Date: Fri, 21 Jun 2019 21:34:34 GMT
t=179396 [st=546] -HTTP_TRANSACTION_READ_HEADERS
t=179396 [st=546] NETWORK_DELEGATE_HEADERS_RECEIVED [dt=0]
t=179396 [st=546] -URL_REQUEST_START_JOB
t=179396 [st=546] URL_REQUEST_DELEGATE_RESPONSE_STARTED [dt=0]
t=179396 [st=546] HTTP_TRANSACTION_READ_BODY [dt=0]
t=179396 [st=546] -REQUEST_ALIVE
The socket does timeout after about 30 seconds.
t=179042 [st=179041] SOCKET_BYTES_SENT
--> byte_count = 3128
t=179042 [st=179041] SOCKET_BYTES_SENT
--> byte_count = 2449
t=209478 [st=209477] SOCKET_READ_ERROR
--> net_error = -7 (ERR_TIMED_OUT)
--> os_error = 60
t=209478 [st=209477] SSL_READ_ERROR
--> error_lib = 33
--> error_reason = 7
--> file = "../../net/socket/socket_bio_adapter.cc"
--> line = 154
--> net_error = -7 (ERR_TIMED_OUT)
--> ssl_error = 1
And in our azure storage blob logs, we can see that it returns a 500 SasNetworkError on the PUT block which shows that the client closed the connection before the timeout expiration.
Our web app will normally retry the PUT request on 500 errors. However, on Mac Chrome it seems that we didn't detect it.
Also, not sure if the following information is relevant, but after the timed out URL_REQUEST, we started to make requests to "ws://127.0.0.1:6263/4":
285774: URL_REQUEST
ws://127.0.0.1:6263/4
Start Time: 2019-06-21 14:34:35.929
t=180463 [st=0] +REQUEST_ALIVE [dt=1]
--> priority = "LOWEST"
--> url = "ws://127.0.0.1:6263/4"
t=180463 [st=0] NETWORK_DELEGATE_BEFORE_URL_REQUEST [dt=0]
t=180463 [st=0] +URL_REQUEST_START_JOB [dt=1]
--> load_flags = 18 (BYPASS_CACHE | DISABLE_CACHE)
--> method = "GET"
--> privacy_mode = 0
--> url = "ws://127.0.0.1:6263/4"
t=180463 [st=0] NETWORK_DELEGATE_BEFORE_START_TRANSACTION [dt=0]
t=180463 [st=0] HTTP_CACHE_GET_BACKEND [dt=0]
t=180463 [st=0] +HTTP_STREAM_REQUEST [dt=1]
t=180463 [st=0] HTTP_STREAM_JOB_CONTROLLER_BOUND
--> source_dependency = 285775 (HTTP_STREAM_JOB_CONTROLLER)
t=180464 [st=1] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 285776 (HTTP_STREAM_JOB)
t=180464 [st=1] -HTTP_STREAM_REQUEST
t=180464 [st=1] -URL_REQUEST_START_JOB
--> net_error = -102 (ERR_CONNECTION_REFUSED)
t=180464 [st=1] URL_REQUEST_DELEGATE_RESPONSE_STARTED [dt=0]
t=180464 [st=1] -REQUEST_ALIVE
--> net_error = -102 (ERR_CONNECTION_REFUSED)
My real data is first input but inverse of result is so big. They are same data when you compare with first and second input. There is only difference decimal size. Why is there different result? Because they are same data. How can they have different result? You can see result and input. It is so strange.
program test
Implicit none
double precision,allocatable,dimension(:,:) :: A
double precision,allocatable,dimension(:) :: WORK
integer ,allocatable,dimension(:) :: ipiv
integer :: n,info,M
external DGETRF,DGETRI
M=8
allocate(A(M,M),WORK(M),IPIV(M))
!!! First Input !!!!
A(1,:)=(/3.740486048842566D-4, 0.0D0, 0.0D0, 4.987315029057229D-5, 0.0D0, 0.0D0, 0.0D0, 0.0D0/)
A(2,:)=(/0.0D0 , 3.740486048842566D-4, 0.0D0, 0.0D0, 4.987315029057229D-5 ,0.0D0 ,0.0D0 ,0.0D0 /)
A(3,:)=(/0.0D0 , 0.0D0 ,3.740486048842566D-4, 0.0D0 ,0.0D0, 4.987315029057229D-5, 0.0D0 ,0.0D0/)
A(4,:)=(/4.987315029057229D-5 ,0.0D0 ,0.0D0 ,6.649753768432517D-6, 0.0D0 ,0.0D0, 0.0D0, 0.0D0 /)
A(5,:)=(/0.0D0 , 4.987315029057229D-5, 0.0D0, 0.0D0 ,6.649753768432517D-6 ,0.0D0 ,0.0D0 ,0.0D0 /)
A(6,:)=(/0.0D0, 0.0D0, 4.987315029057229D-5, 0.0D0 ,0.0D0, 6.649753768432517D-6, 0.0D0 ,0.0D0 /)
A(7,:)=(/0.0D0, 0.0D0 ,0.0D0, 0.0D0 ,0.0D0 ,0.0D0 ,1.499999910593033D-11, 0.0D0 /)
A(8,:)=(/0.0D0 ,0.0D0 ,0.0D0 ,0.0D0 ,0.0D0 ,0.0D0, 0.0D0 ,1.499999910593033D-11 /)
!!!! Second Input !!!!
!A(1,:)=(/3.74D-4, 0.0D0, 0.0D0, 4.98D-5, 0.0D0, 0.0D0, 0.0D0, 0.0D0/)
!A(2,:)=(/0.0D0 , 3.74D-4, 0.0D0, 0.0D0, 4.98D-5 ,0.0D0 ,0.0D0 ,0.0D0 /)
!A(3,:)=(/0.0D0 , 0.0D0 ,3.74D-4, 0.0D0 ,0.0D0, 4.98D-5, 0.0D0 ,0.0D0/)
!A(4,:)=(/4.98D-5 ,0.0D0 ,0.0D0 ,6.64D-6, 0.0D0 ,0.0D0, 0.0D0, 0.0D0 /)
!A(5,:)=(/0.0D0 , 4.98D-5, 0.0D0, 0.0D0 ,6.64D-6 ,0.0D0 ,0.0D0 ,0.0D0 /)
!A(6,:)=(/0.0D0, 0.0D0, 4.98D-5, 0.0D0 ,0.0D0, 6.64D-6, 0.0D0 ,0.0D0 /)
!A(7,:)=(/0.0D0, 0.0D0 ,0.0D0, 0.0D0 ,0.0D0 ,0.0D0 ,1.49D-11, 0.0D0 /)
!A(8,:)=(/0.0D0 ,0.0D0 ,0.0D0 ,0.0D0 ,0.0D0 ,0.0D0, 0.0D0 ,1.49D-11 /)
call DGETRF(M,M,A,M,IPIV,info)
if(info .eq. 0) then
Print *,'succeded'
else
Print *,'failed'
end if
call DGETRI(M,A,M,IPIV,WORK,M,info)
if(info .eq. 0) then
Print *,'succeded'
else
Print *,'failed'
end if
Print *,A
deallocate(A,IPIV,WORK)
end
!!!!! Second Input Result
!1.0e+10 *
! 0.0002 0 0 -0.0015 0 0 0 0
! 0 0.0002 0 0 -0.0015 0 0 0
! 0 0 0.0002 0 0 -0.0015 0 0
! -0.0015 0 0 0.0113 0 0 0 0
! 0 -0.0015 0 0 0.0113 0 0 0
! 0 0 -0.0015 0 0 0.0113 0 0
! 0 0 0 0 0 0 6.7114 0
! 0 0 0 0 0 0 0 6.7114
!!! First Input Result
! 1.0e+21 *
!-0.0238 0 0 0.1783 0 0 0 0
! 0 -0.0238 0 0 0.1783 0 0 0
! 0 0 0.0000 0 0 -0.0000 0 0
! 0.1783 0 0 -1.3375 0 0 0 0
! 0 0.1783 0 0 -1.3375 0 0 0
! 0 0 -0.0000 0 0 0.0000 0 0
! 0 0 0 0 0 0 0.0000 0
! 0 0 0 0 0 0 0 0.0000
Creating a matrix inverse is not a difficult problem.
I converted your earlier example to using a simple approach, based on Gaussian elimination with a shadowed identity matrix, which works well for most cases. The attached program inverts your earlier symmetric matrix, without resorting to pivoting of the rows. It does not need a "black-box".
That you get different results with different coefficients is hardly surprising. With the significant change in results for apparently small changes of input values, shows the sensitivity and possibly poor conditioning of the equation relationship you are using.
https://www.dropbox.com/s/ssotjx45yrz5sf9/dgetri.f90?dl=0
Additional response re "First Input"
https://www.dropbox.com/s/hximfoin977rmov/dgetri_piv4.f90?dl=0
This latest link (16-6) has both data sets included. In "First Input", your equations basically are rows 4:6 are rows 1:3 / 7.5 + small_noise.
This latest code example has accuracy checks both during the matrix inversion and also after. The during test checks the row changes are correct, while the after checks are "A.A^-1 - I" and "A - (A^-1)^-1", which better indicate poor accuracy.
It is interesting that "Second Input" (with more noise) reports a reasonably accurate outcome. Failing to get an inverse with 8-byte reals needs a fairly contrived matrix ! Similarly, the random number derived coefficients examples shows good accuracy.
These examples show that the accuracy tests I have presented don't always identify poorly defined equation relationships. Your inspection of the inverse to identify large variation in values is also useful.
Given the way the equations appear to have been defined, I am not sure what is the outcome you are wanting.
What I do to sort credit in the following dataframe is to use sort_values() function (I've also tried sort()):
df.sort_values('credit', ascending=False, inplace=True)
The problem is that credits are sorted like below:
i credit m reg_date b id
----------------------------------------------------------------------
238 0 4600000.00 0 2014-04-14 False 102214
127 0 4600000.00 0 2014-12-30 False 159479
13 0 16800000.00 0 2015-01-12 False 163503
248 0 16720000.00 0 2012-11-11 False 5116
Ascending is False that's why 4600000.00 is before other credits. But this is not what I wanted. I wanted to sort based on the values. So in the sample above 16800000.00 and 16720000.00 should be before 4600000.00. How to sort this Dataframe non-lexical?
EDIT-1:
Data is more than that and can contain:
120 0 16708000.00 0 2013-12-17 False 51433
248 0 16720000.00 0 2012-11-11 False 5116
13 0 16800000.00 0 2015-01-12 False 163503
21 0 4634000.00 0 2014-12-29 False 159239
136 0 4650000.00 0 2012-11-07 False 4701
.. ... ... ... ... ... ...
231 0 7715000.00 0 2014-02-15 False 83936
182 0 7750000.00 0 2015-07-13 False 201584
You could sort the column separately as type float and use the index to slice the original index
In your case:
import pandas as pd
from StringIO import StringIO
text = """136 0 4650000.00 0 2012-11-07 False 4701
231 0 7715000.00 0 2014-02-15 False 83936
13 0 16800000.00 0 2015-01-12 False 163503
120 0 16708000.00 0 2013-12-17 False 51433
248 0 16720000.00 0 2012-11-11 False 5116
21 0 4634000.00 0 2014-12-29 False 159239
182 0 7750000.00 0 2015-07-13 False 201584
"""
df = pd.read_csv(StringIO(text), delim_whitespace=True,
header=None, index_col=0,
names=['i', 'credit', 'm', 'reg_date', 'b', 'id'])
print df.loc[df.credit.astype(float).sort_values(ascending=False).index]
i credit m reg_date b id
13 0 16800000.0 0 2015-01-12 False 163503
248 0 16720000.0 0 2012-11-11 False 5116
120 0 16708000.0 0 2013-12-17 False 51433
182 0 7750000.0 0 2015-07-13 False 201584
231 0 7715000.0 0 2014-02-15 False 83936
136 0 4650000.0 0 2012-11-07 False 4701
21 0 4634000.0 0 2014-12-29 False 159239
I'm trying to get the UIColor of each pixel from a jpg image in swift, the following code successfully gets each pixel color however the results are confusing me:
func renderLandscape() {
var landscapeImage = UIImage(named: "test")
for var xPos = 0 as CGFloat; xPos < landscapeImage?.size.width; xPos++ {
for var yPos = 0 as CGFloat; yPos < landscapeImage?.size.height; yPos++ {
var currentColor = landscapeImage?.getPixelColor(CGPointMake(xPos, yPos))
NSLog("Color: %#", currentColor!)
}
}
}
I've created an extension of UIImage here:
extension UIImage {
func getPixelColor(pos: CGPoint) -> UIColor {
var pixelData = CGDataProviderCopyData(CGImageGetDataProvider(self.CGImage))
var data: UnsafePointer<UInt8> = CFDataGetBytePtr(pixelData)
var pixelInfo: Int = ((Int(self.size.width) * Int(pos.y)) + Int(pos.x)) * 4
//NSLog("Data: %#", data.encode())
var r = CGFloat(data[pixelInfo]) / CGFloat(255.0)
var g = CGFloat(data[pixelInfo+1]) / CGFloat(255.0)
var b = CGFloat(data[pixelInfo+2]) / CGFloat(255.0)
var a = CGFloat(data[pixelInfo+3]) / CGFloat(255.0)
return UIColor(red: r, green: g, blue: b, alpha: a)
}
}
Obviously the output is extremely long however here is the first 41 lines (the first column of the image):
2015-05-12 22:21:58.793 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.793 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.794 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.795 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.795 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.795 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.797 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.798 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.798 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.798 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.798 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.798 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.799 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.799 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.799 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.799 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.799 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.814 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.815 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.815 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.815 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0 0 1
2015-05-12 22:21:58.815 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0.00392157 0 1
2015-05-12 22:21:58.815 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0.00392157 0 1
2015-05-12 22:21:58.830 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0.0470588 0 1
2015-05-12 22:21:58.831 Game[6542:220967] Color: UIDeviceRGBColorSpace 0 0.141176 0 1
2015-05-12 22:21:58.831 Game[6542:220967] Color: UIDeviceRGBColorSpace 0.627451 0.694118 0.317647 1
2015-05-12 22:21:58.832 Game[6542:220967] Color: UIDeviceRGBColorSpace 0.756863 0.121569 0 1
2015-05-12 22:21:58.832 Game[6542:220967] Color: UIDeviceRGBColorSpace 0.996078 0 0 1
2015-05-12 22:21:58.832 Game[6542:220967] Color: UIDeviceRGBColorSpace 0.996078 0.00392157 0 1
The fist 32 lines are UIDeviceRGBColorSpace 0 0 0 1, which is correct (Black) however after that there should be four more black pixels a green (#2aff00) and three red (#ff0000) except there are 8 non black pixels, each with a different color value.
Here is the image which was created in Photoshop:
Why aren't any of the red colors the same in RGB and why are there 8 non black pixels?
Thanks in advance, Johann
Okay so after a fair bit of struggling I tried saving my image as a PNG file. Fixed everything.
According to a friend JPG images kind of blur between the pixel colours where as PNG will keep each pixel a solid colour. Using PNG for this type of work is much more reliable. - Excuse me for my non-technical talk.
Thank you.